Skip to content

feat(otlp): support http/protobuf OTLP trace export#18609

Draft
bm1549 wants to merge 2 commits into
mainfrom
brian.marks/otlp-http-protobuf-export
Draft

feat(otlp): support http/protobuf OTLP trace export#18609
bm1549 wants to merge 2 commits into
mainfrom
brian.marks/otlp-http-protobuf-export

Conversation

@bm1549

@bm1549 bm1549 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Adds http/protobuf as a second OTLP trace-export encoding alongside the existing http/json path. The encoding is selected from the OTel-standard OTEL_EXPORTER_OTLP_TRACES_PROTOCOL value and passed to libdatadog via the new set_otlp_protocol builder setter.

  • http/json (default) and http/protobuf are supported over HTTP.
  • Any other value (including the OTel grpc default, which libdatadog can't speak) falls back to http/json, preserving pre-wiring behavior.

This PR also bumps libdatadog from v35.0.0 to the OTLP branch (664f16fb, DataDog/libdatadog#2115), which the binding depends on. That bump pulls in the datadog-remote-configlibdd-remote-config rename and the redesigned remote-config parsing API, so tracer_flare.rs is ported to parse per-product via RemoteConfigContent (AgentConfigFile/AgentTaskFile).

Depends on DataDog/libdatadog#2115. The rev is pinned to that PR's branch head; bump it to the squash-merge SHA (or the next libdatadog release that includes it) before merging.

Testing

  • cargo check --all-features passes with 0 warnings against the bumped libdatadog rev.
  • Backend verification (local DD Agent → datadoghq.com): emitted protobuf-only OTLP traces from a fresh service and confirmed ingestion — application/x-protobuf on the wire (HTTP 200), spans landed with correct service/resource names and a preserved 128-bit trace id. http/json regression also confirmed (application/json wire, HTTP 200).
  • system-tests APM_TRACING_OTLP protobuf coverage: DataDog/system-tests companion PR.

Risks

  • Behavioral change is gated on _otlp_endpoint being set; non-OTLP export is unaffected.
  • The libdatadog v35→main bump is the larger surface: it touches the renamed crate and the remote-config parse API used by tracer flare. cargo check --all-features is green; full CI build/test should be watched once the rev is repointed at the merged libdatadog SHA.

Additional Notes

Commits are split: (1) the libdatadog bump + tracer_flare port, (2) the OTLP protobuf feature.

bm1549 and others added 2 commits June 12, 2026 17:15
Bumps the libdatadog git rev from v35.0.0 to 664f16fb (the OTLP
HTTP/protobuf branch, libdatadog#2115). Renames the renamed crate
datadog-remote-config -> libdd-remote-config and ports tracer_flare.rs
to the redesigned RemoteConfigContent parse API (per-product parsing
via AgentConfigFile/AgentTaskFile instead of the removed
RemoteConfigData enum). Regenerates Cargo.lock.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wires the new libdatadog set_otlp_protocol builder setter so OTLP trace
export honors OTEL_EXPORTER_OTLP_TRACES_PROTOCOL. http/json (default)
and http/protobuf are supported over HTTP; any other value (e.g. the
OTel grpc default) falls back to http/json, preserving prior behavior.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bm1549 bm1549 added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Jun 12, 2026
@datadog-official

datadog-official Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 10 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-py | build linux serverless: [amd64, cp315-cp315, v113741238-d2b8243-manylinux2014_x86_64, 1]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-py | build linux serverless: [amd64, cp315-cp315, v113741491-d2b8243-musllinux_1_2_x86_64, 1]   View in Datadog   GitLab

DataDog/apm-reliability/dd-trace-py | build linux serverless: [arm64, cp315-cp315, v113741357-d2b8243-manylinux2014_aarch64, 1]   View in Datadog   GitLab

View all 10 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ecefde5 | Docs | Datadog PR Page | Give us feedback!

@cit-pr-commenter-54b7da

Copy link
Copy Markdown

Codeowners resolved as

ddtrace/internal/settings/_opentelemetry.py                             @DataDog/apm-sdk-capabilities-python
ddtrace/internal/writer/writer.py                                       @DataDog/apm-core-python
src/native/data_pipeline/mod.rs                                         @DataDog/apm-core-python

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.

This is to fix a breaking change in libdatadog

@pr-commenter

pr-commenter Bot commented Jun 12, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-06-12 21:46:47

Comparing candidate commit ecefde5 in PR branch brian.marks/otlp-http-protobuf-export with baseline commit 33e2657 in branch main.

Found 0 performance improvements and 7 performance regressions! Performance is the same for 609 metrics, 10 unstable metrics.

scenario:iast_aspects-re_match_noaspect

  • 🟥 execution_time [+24.013µs; +30.194µs] or [+7.246%; +9.111%]

scenario:iastaspects-capitalize_noaspect

  • 🟥 execution_time [+22.860µs; +29.816µs] or [+8.776%; +11.447%]

scenario:iastaspects-title_aspect

  • 🟥 execution_time [+45.130µs; +51.630µs] or [+13.431%; +15.365%]

scenario:iastaspectsospath-ospathbasename_aspect

  • 🟥 execution_time [+89.616µs; +99.346µs] or [+20.387%; +22.600%]

scenario:iastaspectssplit-rsplit_aspect

  • 🟥 execution_time [+11.887µs; +17.783µs] or [+7.755%; +11.602%]

scenario:span-start

  • 🟥 execution_time [+1.297ms; +1.487ms] or [+8.322%; +9.539%]

scenario:telemetryaddmetric-1-count-metric-1-times

  • 🟥 execution_time [+204.361ns; +235.792ns] or [+9.848%; +11.362%]

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

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant