Skip to content

feat: seed root session ID in master for stable telemetry headers#345

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits intomasterfrom
ayan.khan/stable-session-id-headers
Apr 15, 2026
Merged

feat: seed root session ID in master for stable telemetry headers#345
gh-worker-dd-mergequeue-cf854d[bot] merged 7 commits intomasterfrom
ayan.khan/stable-session-id-headers

Conversation

@khanayan123
Copy link
Copy Markdown
Contributor

@khanayan123 khanayan123 commented Apr 7, 2026

Summary

Seed root_session_id in the master process before workers fork, so all workers share the same root session ID for telemetry correlation per the Stable Service Instance Identifier RFC.

Changes

  • Add root_session_id field to datadog_main_conf_t
  • Generate RuntimeID in create_datadog_main_conf (master process, pre-fork)
  • Pass root_session_id to TracerConfig in make_tracer (worker process, post-fork)

Dependencies

  • Requires dd-trace-cpp#295 to be merged first (adds root_session_id to TracerConfig)

Related

Points to ayan.khan/stable-session-id-headers tip for integration
validation of DD-Session-ID and DD-Root-Session-ID telemetry headers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@datadog-official
Copy link
Copy Markdown

datadog-official bot commented Apr 7, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 66.67%
Overall Coverage: 67.62% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 07364ec | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

Generate root_session_id in create_datadog_main_conf (master process)
and pass it to TracerConfig in make_tracer (worker process). All workers
inherit the same root via fork memory copy, ensuring consistent
DD-Root-Session-ID across telemetry from all workers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@xlamorlette-datadog xlamorlette-datadog left a comment

Choose a reason for hiding this comment

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

lgtm

khanayan123 and others added 2 commits April 10, 2026 14:05
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@khanayan123 khanayan123 changed the title chore: validate stable session ID headers from dd-trace-cpp feat: seed root session ID in master for stable telemetry headers Apr 13, 2026
@khanayan123 khanayan123 marked this pull request as ready for review April 13, 2026 15:15
@khanayan123 khanayan123 requested a review from a team as a code owner April 13, 2026 15:15
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@khanayan123
Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 bot commented Apr 14, 2026

View all feedbacks in Devflow UI.

2026-04-14 14:12:22 UTC ℹ️ Start processing command /merge


2026-04-14 14:12:29 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 0s (p90).


2026-04-14 14:43:05 UTC 🚨 MergeQueue: This merge request is in error

mergequeue build completed successfully, but the github api returned an error while merging the pr.
It's probably because:

  • target branch of PR is restricted to only allow up-to-date branches, but the pr is now outdated
Details

Error: PUT https://api.github.com/repos/DataDog/nginx-datadog/pulls/345/merge: 405 2 of 2 required status checks are expected. [] (Request ID: 8092:144AB2:62E95F:199A84D:69DE526F)

FullStacktrace:
activity error (type: github.GithubService_MergePullRequest, scheduledEventID: 50, startedEventID: 51, identity: 1@github-worker-54d465dd76-b9wps@): PUT https://api.github.com/repos/DataDog/nginx-datadog/pulls/345/merge: 405 2 of 2 required status checks are expected. [] (Request ID: 8092:144AB2:62E95F:199A84D:69DE526F) (type: GitFailure, retryable: false): PUT https://api.github.com/repos/DataDog/nginx-datadog/pulls/345/merge: 405 2 of 2 required status checks are expected. [] (type: ErrorResponse, retryable: true)

@khanayan123
Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351
Copy link
Copy Markdown

gh-worker-devflow-routing-ef8351 bot commented Apr 15, 2026

View all feedbacks in Devflow UI.

2026-04-15 14:34:27 UTC ℹ️ Start processing command /merge


2026-04-15 14:34:34 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-04-15 14:59:17 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in master is approximately 0s (p90).


2026-04-15 15:22:23 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot merged commit 2dfda7f into master Apr 15, 2026
177 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d bot deleted the ayan.khan/stable-session-id-headers branch April 15, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants