Skip to content

Conversation

@etilite
Copy link
Contributor

@etilite etilite commented Oct 26, 2025

Which problem is this PR solving?

Resolves #3653
Resolves #691

Description of the changes

  • Added option WithAttributesOn which adds jaeger.sampler.param and jaeger.sampler.type attributes for sampled spans

@etilite etilite requested a review from a team as a code owner October 26, 2025 19:07
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 26, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: dmathieu / name: Damien Mathieu (55879b2)

@github-actions github-actions bot requested a review from yurishkuro October 26, 2025 19:07
@flc1125
Copy link
Member

flc1125 commented Oct 27, 2025

cc code owner: @yurishkuro PTAL

Copy link
Member

@dmathieu dmathieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those attributes don't match anything defined in semantic conventions.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest writing a test in a different package like jaegerremote_test, to make sure you got the visibility of new functions / types correctly

@yurishkuro
Copy link
Member

Thank you for this PR! Originally when I looked at this problem there was no way in the API to pass back attributes (I think I even had an option issue about that).

@etilite
Copy link
Contributor Author

etilite commented Oct 27, 2025

Those attributes don't match anything defined in semantic conventions.

Can we do anything about it? Those attributes provide back-compatibility with jaeger-remote-sampler and can be turned only by an option. So yeah it is kinda jaeger attributes.

@dmathieu dmathieu dismissed their stale review October 28, 2025 08:37

Wrong assessment.

@etilite
Copy link
Contributor Author

etilite commented Oct 28, 2025

@dmathieu @yurishkuro If you’re okay with it, I could try a different approach - add two new options - functions that create attributes for probabilistic/ratelimiting samplers, so user can define their own attributes to solve this issue.
This solution does not interfere with the semantic convention.

@dmathieu
Copy link
Member

Sorry, my assessment was wrong. As these are jaeger specific, they shouldn't need semantic conventions.

@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.8%. Comparing base (7ff03d6) to head (55879b2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #8073   +/-   ##
=====================================
  Coverage   81.8%   81.8%           
=====================================
  Files        194     194           
  Lines      13362   13380   +18     
=====================================
+ Hits       10936   10954   +18     
  Misses      2029    2029           
  Partials     397     397           
Files with missing lines Coverage Δ
samplers/jaegerremote/sampler.go 92.0% <100.0%> (+1.0%) ⬆️
samplers/jaegerremote/sampler_remote.go 90.4% <100.0%> (ø)
samplers/jaegerremote/sampler_remote_options.go 98.0% <100.0%> (+<0.1%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@etilite
Copy link
Contributor Author

etilite commented Nov 2, 2025

@yurishkuro I added new test in different package and answered on all comments. Review pls

@flc1125
Copy link
Member

flc1125 commented Nov 3, 2025

@yurishkuro I added new test in different package and answered on all comments. Review pls

We can fix the CI errors before entering the review to reduce some trivial checks. 😁

@etilite etilite force-pushed the jaegerremote-attributes branch from 9cc7fce to 8e6fd09 Compare November 3, 2025 12:38
@flc1125
Copy link
Member

flc1125 commented Nov 3, 2025

@etilite please add a CHANGELOG

@flc1125
Copy link
Member

flc1125 commented Nov 4, 2025

@etilite There are currently some conflicts; please fix them.

@etilite
Copy link
Contributor Author

etilite commented Nov 4, 2025

@flc1125 resolved conflicts but now ci/cd failing. Probably need just to retry these jobs, can't do it myself.

@dmathieu dmathieu merged commit ea3c024 into open-telemetry:main Nov 10, 2025
44 of 61 checks passed
@yurishkuro
Copy link
Member

👏

@etilite do you want to make the corresponding changes in Jaeger to recognize the prefixed attributes?

@etilite
Copy link
Contributor Author

etilite commented Nov 10, 2025

👏

@yurishkuro I'm not familiar with Jaeger backend library so it will be nice if you can handle it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing sampler.type & sampler.param attributes/ tags in Jaeger samplers

4 participants