You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AI was used to help implement and review this change. I read and verified the resulting code.
Adds ddog_trace_exporter_config_add_otlp_header to the trace exporter C API. The setter:
passes OTLP request headers into the existing data-pipeline exporter
rejects malformed HTTP names and values before changing the configuration
keeps header contents out of warnings
Repeated names use the last configured value. The FFI example now shows endpoint, header, timeout, protocol, and instrumentation-scope configuration.
Motivation
Language tracers need to pass standard OTEL_EXPORTER_OTLP*_HEADERS settings into libdatadog when they use its OTLP trace exporter. dd-trace-rb is the first consumer in this change set.
Additional Notes
This is an additive C API. The protocol setter still accepts only http/json and http/protobuf; the existing protocol enum leaves room for gRPC support later.
cargo nextest run -p libdd-data-pipeline-ffi — 67 passed
cargo ffi-test — the trace exporter example passed; the full macOS run also reported pre-existing crashtracking signal and missing FFE fixture failures
cargo deny --manifest-path libdd-data-pipeline-ffi/Cargo.toml --color never --log-level error check advisories bans sources — reports existing crossbeam, rand, and time advisories
Comparing candidate commit aedeed3 in PR branch brian.marks/otlp-headers-ffi with baseline commit 94f123f in branch main.
Found 2 performance improvements and 1 performance regressions! Performance is the same for 137 metrics, 0 unstable metrics.
Explanation
This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:
🟩 = significantly better candidate vs. baseline
🟥 = significantly worse candidate vs. baseline
We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.
If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.
Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.
More details about the CI and significant changes
You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.
CIs of the difference of means are often centered around 0%, because often changes are not that big:
---------------------------------(------|---^--------)-------------------------------->
-0.6% 0% 0.3% +1.2%
| | |
lower bound of the CI --' | |
sample mean (center of the CI) -------------' |
upper bound of the CI ----------------------'
As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).
For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:
----------------------------------------|---------|---(---------^---------)---------->
0% 1% 1.3% 2.2% 3.1%
| | | |
significant impact threshold --------------' | | |
lower bound of CI --------------' | |
sample mean (center of the CI) --------------------------' |
upper bound of CI ----------------------------------'
scenario:msgpack_decoder::v05/high_sharing/2000
🟩 execution_time [-99.271µs; -97.477µs] or [-5.936%; -5.828%]
🟩 throughput [+74053.018op/s; +75426.244op/s] or [+6.193%; +6.307%]
scenario:vec_map/get_miss/64
🟥 execution_time [+28.068ns; +28.237ns] or [+98.851%; +99.447%]
Benchmark execution time: 2026-08-05 03:22:53
Comparing candidate commit aedeed3 in PR branch brian.marks/otlp-headers-ffi with baseline commit 94f123f in branch main.
Found 4 performance improvements and 4 performance regressions! Performance is the same for 160 metrics, 10 unstable metrics.
Explanation
This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:
🟩 = significantly better candidate vs. baseline
🟥 = significantly worse candidate vs. baseline
We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.
If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.
Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.
More details about the CI and significant changes
You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.
CIs of the difference of means are often centered around 0%, because often changes are not that big:
---------------------------------(------|---^--------)-------------------------------->
-0.6% 0% 0.3% +1.2%
| | |
lower bound of the CI --' | |
sample mean (center of the CI) -------------' |
upper bound of the CI ----------------------'
As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).
For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:
----------------------------------------|---------|---(---------^---------)---------->
0% 1% 1.3% 2.2% 3.1%
| | | |
significant impact threshold --------------' | | |
lower bound of CI --------------' | |
sample mean (center of the CI) --------------------------' |
upper bound of CI ----------------------------------'
scenario:alloc_free/system/4096
🟥 execution_time [+13.394ns; +13.570ns] or [+16.767%; +16.987%]
🟩 execution_time [-6.161ns; -5.523ns] or [-15.110%; -13.544%]
scenario:ddsketch_encode/into_pb/collapsing
🟩 execution_time [-6.795ns; -5.737ns] or [-15.218%; -12.849%]
scenario:ddsketch_encode/into_pb/large_values
🟩 execution_time [-6.611ns; -6.039ns] or [-16.044%; -14.656%]
scenario:ddsketch_encode/into_pb/mixed
🟩 execution_time [-6.592ns; -5.768ns] or [-15.598%; -13.648%]
scenario:no_profiler/short_circuit/4096
🟥 execution_time [+7.359ns; +7.508ns] or [+7.662%; +7.818%]
Candidate
Omitted due to size.
Baseline
Omitted due to size.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Concise implementation report
AI was used to help implement and review this change. I read and verified the resulting code.
Adds
ddog_trace_exporter_config_add_otlp_headerto the trace exporter C API. The setter:Repeated names use the last configured value. The FFI example now shows endpoint, header, timeout, protocol, and instrumentation-scope configuration.
Motivation
Language tracers need to pass standard
OTEL_EXPORTER_OTLP*_HEADERSsettings into libdatadog when they use its OTLP trace exporter. dd-trace-rb is the first consumer in this change set.Additional Notes
This is an additive C API. The protocol setter still accepts only
http/jsonandhttp/protobuf; the existing protocol enum leaves room for gRPC support later.Companion changes: dd-trace-rb #6152 and system-tests #7458.
How to test the change?
cargo check -p libdd-data-pipeline-fficargo +stable clippy -p libdd-data-pipeline-ffi --all-targets --no-deps -- -D warningscargo nextest run -p libdd-data-pipeline-ffi— 67 passedcargo ffi-test— the trace exporter example passed; the full macOS run also reported pre-existing crashtracking signal and missing FFE fixture failurescargo deny --manifest-path libdd-data-pipeline-ffi/Cargo.toml --color never --log-level error check advisories bans sources— reports existing crossbeam, rand, and time advisories