-
Notifications
You must be signed in to change notification settings - Fork 2
feat: avoid duplicate logs in cloudwatch #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: avoid duplicate logs in cloudwatch #112
Conversation
But still maintain the OTel handlers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modifies the Corva logging system to prevent duplicate log entries in CloudWatch while preserving OpenTelemetry (OTel) log handling functionality. The solution disables log propagation on the CORVA_LOGGER and explicitly attaches OTel handlers when log sending is enabled.
Key changes:
- Disables propagation on CORVA_LOGGER to prevent AWS Lambda root handler duplication
- Adds utility functions to detect and gather OTel handlers from the root logger
- Modifies LoggingContext to explicitly attach OTel handlers when appropriate
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…b.com:corva-ai/python-sdk into feature/improve-corva-logging-with-cloudwatch
But still maintain the OTel handlers.
Rationale
Remove the duplicate logging in CloudWatch, but still maintain the OpenTelemetry handlers.
TODO