Skip to content

RUM-8366 propagate session id in baggage header#2602

Merged
xgouchet merged 1 commit into
developfrom
xgouchet/RUM-8366/propagation_header
Apr 18, 2025
Merged

RUM-8366 propagate session id in baggage header#2602
xgouchet merged 1 commit into
developfrom
xgouchet/RUM-8366/propagation_header

Conversation

@xgouchet

Copy link
Copy Markdown
Contributor

What does this PR do?

Update the header used to propagate the RUM session ID when tracing

@xgouchet
xgouchet requested review from a team as code owners April 15, 2025 07:36
tags.append(RUM_SESSION_ID_TAG_KEY);
tags.append('=');
tags.append(sessionId);
carrier.put(BAGGAGE_KEY, RUM_SESSION_ID_BAGGAGE_KEY + '='+sessionId);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

question: we already have OT_BAGGAGE_PREFIX (ot-baggage-) here, which is used with a particular baggage item key.

won't we have any issues with having ot-baggage-xxx and baggage at the same time at the same time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Those headers will be independant, one of them uses the opentelemetry format, while the latter uses the W3C recommended format, ensuring it'll be propagated throughout the trace in the backend.

tags.append(RUM_SESSION_ID_TAG_KEY);
tags.append('=');
tags.append(sessionId);
carrier.put(BAGGAGE_KEY, RUM_SESSION_ID_BAGGAGE_KEY + '='+sessionId);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do we need to have a similar change for the com.datadog.trace.core.propagation.DatadogHttpCodec, etc.?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Indeed, done

@codecov-commenter

codecov-commenter commented Apr 15, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 16.66667% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.02%. Comparing base (72376a1) to head (9290c56).
⚠️ Report is 720 commits behind head on develop.

Files with missing lines Patch % Lines
.../datadog/opentracing/propagation/W3CHttpCodec.java 0.00% 4 Missing ⚠️
...tadog/trace/core/propagation/DatadogHttpCodec.java 0.00% 3 Missing ⚠️
...m/datadog/trace/core/propagation/W3CHttpCodec.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2602      +/-   ##
===========================================
+ Coverage    69.98%   70.02%   +0.04%     
===========================================
  Files          819      819              
  Lines        30579    30576       -3     
  Branches      5121     5121              
===========================================
+ Hits         21399    21408       +9     
- Misses        7740     7743       +3     
+ Partials      1440     1425      -15     
Files with missing lines Coverage Δ
...adog/opentracing/propagation/DatadogHttpCodec.java 86.08% <100.00%> (+0.71%) ⬆️
.../com/datadog/trace/core/propagation/HttpCodec.java 27.62% <ø> (ø)
...tadog/trace/core/propagation/ptags/PTagsCodec.java 55.32% <ø> (+0.68%) ⬆️
...tadog/trace/core/propagation/DatadogHttpCodec.java 9.47% <0.00%> (-0.31%) ⬇️
...m/datadog/trace/core/propagation/W3CHttpCodec.java 5.84% <0.00%> (-0.12%) ⬇️
.../datadog/opentracing/propagation/W3CHttpCodec.java 3.49% <0.00%> (+0.12%) ⬆️

... and 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xgouchet
xgouchet force-pushed the xgouchet/RUM-8366/propagation_header branch from 4cc134e to 5ff9ef7 Compare April 15, 2025 11:55
@xgouchet
xgouchet requested a review from 0xnm April 16, 2025 06:41
jonathanmos
jonathanmos previously approved these changes Apr 16, 2025
0xnm
0xnm previously approved these changes Apr 16, 2025
@xgouchet
xgouchet dismissed stale reviews from 0xnm and jonathanmos via 1384d4a April 17, 2025 07:06
@xgouchet
xgouchet force-pushed the xgouchet/RUM-8366/propagation_header branch from 5ff9ef7 to 1384d4a Compare April 17, 2025 07:06
@xgouchet
xgouchet requested review from 0xnm and jonathanmos April 17, 2025 07:06
@xgouchet
xgouchet force-pushed the xgouchet/RUM-8366/propagation_header branch from 1384d4a to 9290c56 Compare April 17, 2025 10:02
@xgouchet
xgouchet merged commit dfad051 into develop Apr 18, 2025
@xgouchet
xgouchet deleted the xgouchet/RUM-8366/propagation_header branch April 18, 2025 14:13
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.

4 participants