Skip to content

feat(otlp): cache OpenTelemetry trace state in OTLP export - #12407

Draft
MilanGarnier wants to merge 1 commit into
milan.garnier/ot.thfrom
milan.garnier/ot.th-otlp-export
Draft

feat(otlp): cache OpenTelemetry trace state in OTLP export#12407
MilanGarnier wants to merge 1 commit into
milan.garnier/ot.thfrom
milan.garnier/ot.th-otlp-export

Conversation

@MilanGarnier

@MilanGarnier MilanGarnier commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Exports the full existing W3C tracestate through OTLP. When no full W3C tracestate exists, the JSON and protobuf exporters reuse a cached ot= member for every local span in the trace chunk.

Motivation

Preserves the existing OTLP tracestate contract while exporting locally generated OpenTelemetry sampling state without per-span ot= allocation.

Additional Notes

Validated with focused OTLP JSON/protobuf tests and :dd-trace-core:spotlessCheck.

Contributor Checklist

  • Title and labels follow repository conventions
  • Tests and formatting checks pass

Jira ticket: APMAPI-2172

@MilanGarnier MilanGarnier added tag: ai generated Largely based on code generated by an AI or LLM comp: core Tracer core labels Sep 4, 2026
@MilanGarnier MilanGarnier changed the title feat(otlp): export cached OpenTelemetry trace state Export cached OpenTelemetry trace state Sep 4, 2026
@MilanGarnier MilanGarnier added the type: feature Enhancements and improvements label Sep 4, 2026
@MilanGarnier MilanGarnier changed the title Export cached OpenTelemetry trace state feat(otlp): cache OpenTelemetry trace state in OTLP export Sep 4, 2026
@datadog-datadog-prod-us1

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.01 s 14.00 s [-0.7%; +0.9%] (no difference)
startup:insecure-bank:tracing:Agent 12.90 s 13.06 s [-1.9%; -0.4%] (maybe better)
startup:petclinic:appsec:Agent 16.93 s 16.84 s [-0.4%; +1.5%] (no difference)
startup:petclinic:iast:Agent 16.81 s 16.97 s [-1.6%; -0.3%] (maybe better)
startup:petclinic:profiling:Agent 16.61 s 16.74 s [-1.7%; +0.2%] (no difference)
startup:petclinic:sca:Agent 16.93 s 16.65 s [+0.8%; +2.7%] (maybe worse)
startup:petclinic:tracing:Agent 16.05 s 16.23 s [-2.0%; -0.2%] (maybe better)

Commit: 5fcbf2be · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@MilanGarnier
MilanGarnier force-pushed the milan.garnier/ot.th-otlp-export branch from e08c36d to 5fcbf2b Compare September 4, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core tag: ai generated Largely based on code generated by an AI or LLM type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant