-
Notifications
You must be signed in to change notification settings - Fork 395
refactor: Improve error handling for exception #1012
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
refactor: Improve error handling for exception #1012
Conversation
Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com>
Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com>
| ) | ||
| except ClientError: | ||
| logger.error(f"Failed to store retry data for prefix {prefix}") | ||
| except ClientError as e: |
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.
not related to this line in particular
I think it's also worth standardizing log.exception and log.error usage depending on what we catch. I noticed a mixed usage of log.error and log.exception in this file
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.
I'm not very aware of the difference between the two. Before I deep dive into the documentation, do you have any preferences / insights on which solution we should use?
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.
lgtm, small comment on logging patterns
Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com>
* refactor(aws)!: AWSX-1703 Change matching of regex. Previously done against JSON, now only log message (#996) * refactor(aws)!: AWSX-1703 Change matching of regex. Previously done against JSON, now only on log Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * fixup! refactor(aws)!: AWSX-1703 Change matching of regex. Previously done against JSON, now only on log Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> --------- Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * feat(aws)!: Drop deprecated TCP support (#1000) Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * feat(aws)!: Remove deprecated PrivateLink env variable (#1002) Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * docs(aws): Removing JSON explanation in the include at match documentation (#1007) Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * Add environment variable to support backend storage tag enrichment (#1006) * feat(aws): AWSX-1566 Adding storage tag HTTP header Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * feat(aws): AWSX-1566 Adding new variable in the cloudformation template Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * feat: AWSX-1566 Restoring fetch in the integration test to see metrics Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * fixup! feat: AWSX-1566 Restoring fetch in the integration test to see metrics Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * docs(aws): AWSX-1566 Refine documentation around the new variable Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> --------- Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * fix(aws): Fixing discrepancies of the fetch configuration between cloudformation and code Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * feat: Add a changelog for the v5 (#1009) * feat: Add a changelog for the v5 Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * fixup! feat: Add a changelog for the v5 Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * Update aws/logs_monitoring/CHANGELOG.md Co-authored-by: Raphaël Allier <118757729+RaphaelAllier@users.noreply.github.com> * fixup! Update aws/logs_monitoring/CHANGELOG.md Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> --------- Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> Co-authored-by: Raphaël Allier <118757729+RaphaelAllier@users.noreply.github.com> * Update aws/logs_monitoring/CHANGELOG.md Co-authored-by: Georgi <georgi.ajaeiya@datadoghq.com> * Update aws/logs_monitoring/CHANGELOG.md Co-authored-by: Georgi <georgi.ajaeiya@datadoghq.com> * Update aws/logs_monitoring/CHANGELOG.md Co-authored-by: Georgi <georgi.ajaeiya@datadoghq.com> * Update aws/logs_monitoring/CHANGELOG.md Co-authored-by: Georgi <georgi.ajaeiya@datadoghq.com> * Update aws/logs_monitoring/CHANGELOG.md Co-authored-by: Georgi <georgi.ajaeiya@datadoghq.com> * docs: Updating changelog from comments Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * fixup! docs: Updating changelog from comments Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * Add reference to the changelog in README (for public doc) (#1011) * feat: Add link to the changelog in the read toe reflect the documentation The readme is feeding this page https://docs.datadoghq.com/logs/guide/forwarder/?tab=cloudformation Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * fixup! feat: Add link to the changelog in the read toe reflect the documentation Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> --------- Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * refactor: Improve error handling for exception (#1012) * refactor: Improve error handling for exception Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * fixup! refactor: Improve error handling for exception Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * fixup! refactor: Improve error handling for exception Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> --------- Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> * Update aws/logs_monitoring/lambda_function.py Co-authored-by: Georgi <georgi.ajaeiya@datadoghq.com> * fixup! Update aws/logs_monitoring/lambda_function.py Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> --------- Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com> Co-authored-by: Raphaël Allier <118757729+RaphaelAllier@users.noreply.github.com> Co-authored-by: Georgi <georgi.ajaeiya@datadoghq.com>
What does this PR do?
Motivation
Testing Guidelines
Additional Notes
Types of changes
Check all that apply