Skip to content
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

Jaeger Propagator: Fix accepting short trace and span IDs #2731

Merged

Conversation

mfrister
Copy link
Contributor

@mfrister mfrister commented Sep 5, 2022

Fixes #2729.

While implementing the fix for trace IDs, i noticed that span IDs have the same requirement, so I fixed them as well.

As an optimization, we could keep the special case for 64-bit tracing IDs with a constant padding. I'm not sure it's worth it, so I haven't implemented this for now.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 5, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@hanyuancheung
Copy link
Member

@mfrister Could you please sign the CLA?

@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Merging #2731 (68bf034) into main (4e0d97e) will decrease coverage by 0.0%.
The diff coverage is 100.0%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2731     +/-   ##
=======================================
- Coverage   69.4%   69.3%   -0.1%     
=======================================
  Files        145     145             
  Lines       6707    6712      +5     
=======================================
+ Hits        4655    4657      +2     
- Misses      1938    1940      +2     
- Partials     114     115      +1     
Impacted Files Coverage Δ
propagators/jaeger/jaeger_propagator.go 97.3% <100.0%> (+0.1%) ⬆️
samplers/jaegerremote/sampler_remote.go 85.4% <0.0%> (-2.0%) ⬇️

@mfrister
Copy link
Contributor Author

mfrister commented Sep 6, 2022

@mfrister Could you please sign the CLA?

Sure, I'm already working on it. Will need a corporate CLA, so this might take a few days.

@mfrister mfrister force-pushed the fix-jaeger-propagator-short-ids branch from aef1eb8 to 5d93e04 Compare September 6, 2022 06:08
@Aneurysm9 Aneurysm9 added bug Something isn't working blocked: CLA Waiting on CLA to be signed before progress can be made area: propagators Related to the propagators module labels Sep 6, 2022
@mfrister mfrister force-pushed the fix-jaeger-propagator-short-ids branch from 5d93e04 to e8f2b23 Compare September 8, 2022 07:16
@mfrister
Copy link
Contributor Author

mfrister commented Sep 8, 2022

@Aneurysm9 I've got the CLA signed and I've added a changelog entry.

@Aneurysm9 Aneurysm9 removed the blocked: CLA Waiting on CLA to be signed before progress can be made label Sep 8, 2022
CHANGELOG.md Outdated Show resolved Hide resolved
@mfrister mfrister force-pushed the fix-jaeger-propagator-short-ids branch from e8f2b23 to 6e03784 Compare September 8, 2022 08:18
CHANGELOG.md Outdated Show resolved Hide resolved
@mfrister mfrister force-pushed the fix-jaeger-propagator-short-ids branch from 6e03784 to 339643c Compare September 9, 2022 05:12
The Jaeger propagation format spec [1] requires servers to 0-left-pad
hex string values shorter than 32 bytes. The Jaeger Python client
library generates variable-length hex strings from Trace IDs, with
leading zeroes being omitted, so this fixes an interoperability issue.

[1] https://www.jaegertracing.io/docs/1.37/client-libraries/#value
The Jaeger propagation format spec says servers must 0-left-pad span
IDs shorter than 64 bit, just like they do with trace IDs.

fixup span
@mfrister mfrister force-pushed the fix-jaeger-propagator-short-ids branch from 339643c to b4a5d2c Compare September 9, 2022 09:36
@mfrister
Copy link
Contributor Author

Is there anything missing for this to get merged?

@Aneurysm9 Aneurysm9 merged commit 167b53f into open-telemetry:main Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: propagators Related to the propagators module bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jaeger propagator doesn't accept trace ids with lengths other than 64 and 128 bit
5 participants