-
Notifications
You must be signed in to change notification settings - Fork 690
Check for None result in gRPC (#3380) #3381
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
Conversation
Thanks for the PR, could you please write a test for this to avoid regressions in the future? |
That was an adventure! Added a test that counts |
instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-grpc/tests/test_client_interceptor.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 small nit fixed, LGTM
Description
This is a fix for #3380 that checks explicitly for a
None
result rather than evaluating truthiness. PubSub results with zero messages evaluate toFalse
, causingspan.end()
to be called twice.Fixes #3380
Type of change
How Has This Been Tested?
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.