-
Notifications
You must be signed in to change notification settings - Fork 620
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
Re-raise redis.WatchError
s when they occur
#2721
Conversation
|
I also just signed the CLA |
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.
Thanks for working on this one. Could you please fix lint error and add changelog entry? You can find more guidance on the contributing guide here
...tion/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py
Outdated
Show resolved
Hide resolved
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.
With the s/reraisable/exception/ suggested by Emidio LGTM
In open-telemetry#2668, we started to avoid having the `redis.WatchError` mark the span as having failed, but we were inadvertently suppressing that exception from the calling code. `redis.WatchError` is used for flow-of-control concurrency in many applications, and applications depend on catching the error to handle concurrent changes to keys during redis pipelines. This re-raises the `WatchError` to keep the instrumentation transparent to the application. Fixes open-telemetry#2639
80d8ec3
to
8bf9211
Compare
Thanks, folks! |
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.
The logic is make sense to me, nice catch!
Description
In #2668, we started to avoid having the
redis.WatchError
mark the span ashaving failed, but we were inadvertently suppressing that exception from the
calling code.
redis.WatchError
is used for flow-of-control concurrency inmany applications, and applications depend on catching the error to handle
concurrent changes to keys during redis pipelines.
This re-raises the
WatchError
to keep the instrumentation transparent to theapplication.
Fixes #2639
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.