Skip to content

feat(telemetry): add stable session identifier headers#195

Closed
khanayan123 wants to merge 2 commits intomainfrom
ayan.khan/stable-session-identifier-headers
Closed

feat(telemetry): add stable session identifier headers#195
khanayan123 wants to merge 2 commits intomainfrom
ayan.khan/stable-session-identifier-headers

Conversation

@khanayan123
Copy link
Copy Markdown

Summary

Implements the Stable Service Instance Identifier RFC for dd-trace-rs.

  • DD-Session-ID: present on every telemetry request (set to runtime_id)
  • DD-Root-Session-ID: present only in child processes, inherited via DD_ROOT_RS_SESSION_ID env var
  • Config gains a root_session_id field: reads DD_ROOT_RS_SESSION_ID at init, falls back to runtime_id for root processes

Changes

  • src/core/configuration/configuration.rs:
    • Config: add root_session_id: &'static str field
    • process_root_session_id(): reads DD_ROOT_RS_SESSION_ID env var or falls back to runtime_id
    • root_session_id(): public getter
  • src/core/telemetry.rs: pass root_session_id to TelemetryWorkerBuilder

Dependencies

Blocked on: DataDog/libdatadog#1782TelemetryWorkerBuilder::root_session_id field must be published before this can compile against the released crate.

CI will show a compile error on builder.root_session_id until the libdatadog PR is merged and published.

Related

Test plan

khanayan123 and others added 2 commits March 23, 2026 14:41
Implement the Stable Service Instance Identifier RFC for dd-trace-rs.

- Add root_session_id field to Config, populated from DD_ROOT_RS_SESSION_ID
  env var (set by parent process) or falling back to runtime_id for root
  processes
- Add root_session_id() getter on Config
- Pass root_session_id to TelemetryWorkerBuilder so libdd-telemetry emits
  DD-Session-ID and DD-Root-Session-ID headers on all telemetry requests

Depends on: DataDog/libdatadog#<libdatadog-pr>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Point all libdatadog workspace deps at the stable-session-identifier-headers
branch so CI can compile builder.root_session_id. Revert to crates.io versions
once the libdatadog PR is merged and published.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant