Skip to content

feat(profiling): Integrate OTLP profiles export into the agent - #12871

Draft
jbachorik wants to merge 1 commit into
jb/otlp-profile-converterfrom
jb/otlp-profile-wiring
Draft

jbachorik wants to merge 1 commit into
jb/otlp-profile-converterfrom
jb/otlp-profile-wiring

Conversation

@jbachorik

@jbachorik jbachorik commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Connects the OTLP profiles pipeline to the profiler agent. After this PR, the agent converts JFR recordings to OTLP/P and exports them.

  • OtlpProfileUploader consumes reference-counted RecordingData, converts through the profiling-otel converter, and sends through the otlp-exporter sender via OtlpProfilesSenderFactory.
  • LightweightOtlpEncoder assembles payloads with low allocation.
  • OtlpTelemetry reports export attempts, export completions, and conversion time gauges.
  • New configuration: DD_PROFILING_OTLP_* and OTEL_EXPORTER_OTLP_PROFILES_* variables for endpoint, headers, protocol, compression, and timeout. OtelEnvironmentConfigSource resolves them. supported-configurations.json and ConfigDefaults register them. ProfilingConfig.OtlpMode is registry-version-B gated.
  • ProfilingAgent and CompositeController attach the uploader as a recording consumer.
  • The module is included in the agent shadow jar.

The feature is not production-ready. Every flag defaults to off.

Motivation

The converter, the sender transport, and the reference-counted recordings exist as standalone pieces. None of them runs until the profiler agent uses them. This PR connects them. The agent feeds recordings to the uploader. The uploader converts and sends. The agent reports what happened.

The shape of this PR follows three constraints.

  • The export is off by default. The feature is not production-ready, so no user gets the new behavior without asking for it.
  • The configuration surface matches the other OTLP signals. Traces, metrics, and logs already use OTEL_EXPORTER_OTLP_* variables with a generic fallback. Profiles follow the same pattern, so operators use a surface they already know. DD_OTLP_PROFILES_HEADERS is marked sensitive, like DD_OTLP_TRACES_HEADER, so header values do not leak into telemetry.
  • The export path reports telemetry. An export that fails silently is invisible to operators. The reported attempts, completions, and conversion times make the pipeline observable.

Additional Notes

Part of a 5-PR stack. Each PR bases on the previous one.

  1. The payload and request body move (refactor: Move OtlpPayload and OTLP request bodies to communication/otlp-exporter #12880)
  2. The sender extraction and the canonical resource attributes (refactor: Extract OTLP sender infrastructure to communication/otlp-exporter #12868)
  3. RecordingData reference counting (feat(profiling): Reference-count RecordingData lifecycle #12869)
  4. The JFR to OTLP/P converter, profiling-otel, plus jafar 0.26.2 (feat(profiling): Add JFR to OTLP/P converter with CLI, benchmarks and validation #12870)
  5. this PR: the OTLP profiles export wiring

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@dd-octo-sts

dd-octo-sts Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)

Suite Status
Startup 🟡 warning

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 13.91 s 13.83 s [-0.1%; +1.2%] (no difference)
startup:insecure-bank:tracing:Agent 12.80 s 12.89 s [-1.5%; +0.2%] (no difference)
startup:petclinic:appsec:Agent 17.73 s 17.58 s [-0.2%; +1.8%] (no difference)
startup:petclinic:iast:Agent 16.79 s 17.58 s [-8.6%; -0.4%] (maybe better)
startup:petclinic:profiling:Agent 17.49 s 17.27 s [-0.0%; +2.6%] (no difference)
startup:petclinic:sca:Agent 17.79 s 17.69 s [-0.4%; +1.6%] (no difference)
startup:petclinic:tracing:Agent 16.63 s 16.77 s [-1.8%; +0.2%] (no difference)

Commit: d8c3cc91 · 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.

@jbachorik
jbachorik force-pushed the jb/otlp-profile-converter branch from 5fb5676 to 900b31a Compare October 14, 2026 21:47
@jbachorik
jbachorik force-pushed the jb/otlp-profile-wiring branch from d8c3cc9 to 2e24d4b Compare October 14, 2026 21:47
@jbachorik
jbachorik force-pushed the jb/otlp-profile-converter branch from 900b31a to 7c38d31 Compare October 14, 2026 21:57
@jbachorik jbachorik closed this Oct 14, 2026
@jbachorik
jbachorik force-pushed the jb/otlp-profile-wiring branch from 2e24d4b to 7c38d31 Compare October 14, 2026 21:57
@jbachorik jbachorik reopened this Oct 14, 2026
@jbachorik
jbachorik force-pushed the jb/otlp-profile-wiring branch from e043d30 to 2ec2b21 Compare October 14, 2026 22:23
@jbachorik
jbachorik force-pushed the jb/otlp-profile-converter branch from af5329d to a8eced5 Compare October 14, 2026 22:31
@jbachorik
jbachorik force-pushed the jb/otlp-profile-wiring branch from 2ec2b21 to 99297d3 Compare October 14, 2026 22:31
@jbachorik
jbachorik force-pushed the jb/otlp-profile-converter branch from a8eced5 to c5b6483 Compare October 14, 2026 22:38
@jbachorik
jbachorik force-pushed the jb/otlp-profile-wiring branch from 99297d3 to 7aa9fdc Compare October 14, 2026 22:38
@jbachorik
jbachorik force-pushed the jb/otlp-profile-converter branch from c5b6483 to d4e3a66 Compare October 14, 2026 22:44
@jbachorik
jbachorik force-pushed the jb/otlp-profile-wiring branch from 7aa9fdc to 22ddaab Compare October 14, 2026 22:44
@jbachorik
jbachorik force-pushed the jb/otlp-profile-converter branch from d4e3a66 to 7efca57 Compare October 14, 2026 22:45
@jbachorik
jbachorik force-pushed the jb/otlp-profile-wiring branch from 22ddaab to f705c37 Compare October 14, 2026 22:45
@jbachorik
jbachorik force-pushed the jb/otlp-profile-converter branch from 7efca57 to 6d01747 Compare October 14, 2026 22:50
@jbachorik
jbachorik force-pushed the jb/otlp-profile-wiring branch from f705c37 to 498d946 Compare October 14, 2026 22:50
@jbachorik
jbachorik force-pushed the jb/otlp-profile-converter branch from 6d01747 to e235a1c Compare October 14, 2026 22:51
@jbachorik
jbachorik force-pushed the jb/otlp-profile-wiring branch from 498d946 to c1eece2 Compare October 14, 2026 22:51
Wire the converter into the profiler: OtlpProfileUploader consumes
reference-counted RecordingData via a LightweightOtlpEncoder and ships
profiles through the otlp-exporter sender, with conversion/export
telemetry reported through OtlpTelemetry.

Configuration surface: DD_PROFILING_OTLP_* and
OTEL_EXPORTER_OTLP_PROFILES_* (endpoint, headers, protocol,
compression, timeout) resolved through OtelEnvironmentConfigSource,
registered in supported-configurations.json and ConfigDefaults.
Included in the agent shadow jar.
@jbachorik
jbachorik force-pushed the jb/otlp-profile-converter branch from e235a1c to 2684827 Compare October 14, 2026 22:55
@jbachorik
jbachorik force-pushed the jb/otlp-profile-wiring branch from c1eece2 to 5c587d2 Compare October 14, 2026 22:55
@datadog-datadog-prod-us1-2

This comment has been minimized.

This branch has not been deployed

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

Labels

comp: profiling Profiling tag: ai generated Largely based on code generated by an AI or LLM type: feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant