fix(grpc): handle NotImplementedError from add_done_callback in aio client#4429
Open
alliasgher wants to merge 1 commit intoopen-telemetry:mainfrom
Open
fix(grpc): handle NotImplementedError from add_done_callback in aio client#4429alliasgher wants to merge 1 commit intoopen-telemetry:mainfrom
alliasgher wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
Contributor
|
This is missing a test for checking this is working fine now and conflict handling in the CHANGELOG |
…lient When a user provides a custom grpc.aio interceptor that awaits the call object (e.g. `call = await continuation(...); return await call`), the resulting call object may not implement add_done_callback, raising NotImplementedError. Catch the exception and invoke the callback immediately in that case. The code and details are already available at that point so the span can still be finalised correctly. Fixes open-telemetry#3915 Signed-off-by: alliasgher <alliasgher123@gmail.com>
fe37463 to
c788d60
Compare
Author
|
I think the comment about #47040 was meant for a different PR (it's a collector-contrib PR fixing the azurefunctions config round-trip, unrelated to this grpc aio fix). Happy to proceed here if that's correct. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3915. When a user provides a grpc.aio interceptor that awaits the call object, the resulting type may not implement add_done_callback. Catch NotImplementedError and invoke the callback immediately with the already-available code and details.