-
Notifications
You must be signed in to change notification settings - Fork 821
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
fix(propagator-b3): update extract to check for array #2285
fix(propagator-b3): update extract to check for array #2285
Conversation
What truthy value causes this check to pass which is avoided by checking for |
Codecov Report
@@ Coverage Diff @@
## main #2285 +/- ##
==========================================
+ Coverage 92.74% 92.76% +0.02%
==========================================
Files 145 145
Lines 5182 5184 +2
Branches 1059 1060 +1
==========================================
+ Hits 4806 4809 +3
+ Misses 376 375 -1
|
@dyladan I have updated it and normalized the header value so the intention is clear. An empty array evaluates to true so it was passing the check. |
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
Which problem is this PR solving?
TextMapGetter
inopentelemetry-instrumentation-grpc
returns an empty array if the header value cannot be found. Theextract
method inB3Propagator
only checks for a truthy value and will fail to extract b3 multi headers.Short description of the changes
TextMapGetter
returns an array.