We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting a bug report.
@opentelemetry/propagator-jaeger: 1.0.1
node 14,16
extract jaeger header, uber-trace-id: '0000000000000000ffc0efb753f8cd38:ffc0efb753f8cd38:0000000000000000:0' return spanContext { traceId: '0000000000000000ffc0efb753f8cd38', spanId: 'ffc0efb753f8cd38', isRemote: true, traceFlags: 1 }
traceFlags should be 0
traceFlags is 0
if the traceFlag in header is 00, the extract result is right.
I check the code , in packages/opentelemetry-propagator-jaege/src/JaegerPropagator.ts , function deserializeSpanContext
const traceFlags = flags.match(/^[0-9a-f]{2}$/i) ? parseInt(flags) & 1 : 1;
should be
const traceFlags = flags.match(/^[0-9a-f]{1,2}$/i) ? parseInt(flags) & 1 : 1;
We can see the flags define in https://www.jaegertracing.io/docs/1.33/client-libraries/
One byte bitmap, as one or two hex digits (leading zero may be omitted)
And you have also taken into account the 1-digit and 2-digit compatibility, as I have seen in the unit tests
it 'should extract context of a sampled span from carrier with 1 bit flag'
But the test case passes with flag(1), but not with 0.
This causes an exception to the sampling judgment of baseParent. Maybe I can give a PR.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Please answer these questions before submitting a bug report.
What version of OpenTelemetry are you using?
@opentelemetry/propagator-jaeger: 1.0.1
What version of Node are you using?
node 14,16
What did you do?
extract jaeger header, uber-trace-id: '0000000000000000ffc0efb753f8cd38:ffc0efb753f8cd38:0000000000000000:0'
return spanContext
{
traceId: '0000000000000000ffc0efb753f8cd38',
spanId: 'ffc0efb753f8cd38',
isRemote: true,
traceFlags: 1
}
What did you expect to see?
traceFlags should be 0
What did you see instead?
traceFlags is 0
Additional context
if the traceFlag in header is 00, the extract result is right.
I check the code , in packages/opentelemetry-propagator-jaege/src/JaegerPropagator.ts , function deserializeSpanContext
should be
We can see the flags define in https://www.jaegertracing.io/docs/1.33/client-libraries/
And you have also taken into account the 1-digit and 2-digit compatibility, as I have seen in the unit tests
But the test case passes with flag(1), but not with 0.
This causes an exception to the sampling judgment of baseParent. Maybe I can give a PR.
The text was updated successfully, but these errors were encountered: