Skip to content

feat(tracer): add OTLP metrics HTTP exporter for span metrics#4899

Open
rachelyangdog wants to merge 14 commits into
mainfrom
rachel.yang/otlp-span-metrics-transport
Open

feat(tracer): add OTLP metrics HTTP exporter for span metrics#4899
rachelyangdog wants to merge 14 commits into
mainfrom
rachel.yang/otlp-span-metrics-transport

Conversation

@rachelyangdog

@rachelyangdog rachelyangdog commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

OTLP Span Metrics — Part 3 of 4: HTTP Exporter

Adds the HTTP transport that sends OTLP metrics payloads to the configured endpoint.

Stack order (merge in sequence):

  1. otlp-span-metrics-config — configuration (PR feat(config): add OTLP span metrics config  #4895)
  2. otlp-span-metrics-conversion — ClientStatsPayload → OTLP protobuf conversion (PR feat(tracer): stats to OTLP histogram conversion for OTLP span metrics #4897)
  3. This PR — OTLP HTTP exporter
  4. otlp-span-metrics-wireup — tracer integration and system-test fixes

What this PR does

Adds ddtrace/tracer/otlp_metrics_exporter.go, a thin HTTP client that:

  • Accepts an *otlpMetricsExporter configured from internal/config (endpoint URL, headers, protocol)
  • Supports both application/x-protobuf and application/json protocols, controlled by OTEL_EXPORTER_OTLP_PROTOCOL
  • Calls BuildOTLPMetricsRequest (from PR 2) to convert the payload, then POSTs it
  • Adds config helpers for OTLPMetricsURL, OTLPMetricsHeaders, and OTLPMetricsProtocol

Testing

  • Unit tests in otlp_metrics_exporter_test.go with a local HTTP server verifying correct content-type, headers, and payload encoding for both protocols

Motivation

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running make lint locally.
  • New code doesn't break existing tests. You can check this by running make test locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • All generated files are up to date. You can check this by running make generate locally.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to date by running make fix-modules locally.

Unsure? Have a question? Request a review!

@rachelyangdog
rachelyangdog requested review from a team as code owners June 16, 2026 14:40
@rachelyangdog
rachelyangdog marked this pull request as draft June 16, 2026 14:40
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jun 16, 2026

Copy link
Copy Markdown

Pipelines  Tests

⚠️ Warnings

🚦 4 Pipeline jobs failed

Check Pull Request CI Status | all-jobs-are-green   View in Datadog   GitHub Actions

Dynamic Analysis Checks | Dynamic Analysis with Deadlock Detection / test-contrib   View in Datadog   GitHub Actions

Dynamic Analysis Checks | Dynamic Analysis with Deadlock Detection / test-contrib-matrix (./contrib/IBM/sarama/ ./contrib/bradfitz/gomemcache/ ./contrib/dimfeld/httpt...   View in Datadog   GitHub Actions

View all 4 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 80.28%
Overall Coverage: 62.86% (+5.43%)

Useful? React with 👍 / 👎

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3bab5e0551

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/config/config.go
Comment thread ddtrace/tracer/stats_to_otlp_metrics.go Outdated
Comment thread internal/config/config.go Outdated
Comment thread internal/config/config.go Outdated
Comment thread internal/config/config_helpers.go Outdated
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch from 3bab5e0 to 60f00dc Compare June 16, 2026 14:47
@pr-commenter

pr-commenter Bot commented Jun 16, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-07-24 16:06:18

Comparing candidate commit 9c10faa in PR branch rachel.yang/otlp-span-metrics-transport with baseline commit fa297ea in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 326 metrics, 0 unstable metrics, 1 flaky benchmarks without significant changes.

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 ----------------------------------'

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

Known flaky benchmarks without significant changes:

  • scenario:BenchmarkOTLPTraceWriterFlush

@rachelyangdog rachelyangdog changed the title feat(tracer): add OTLP metrics HTTP exporter for span metrics (SEMCON-1093) feat(tracer): add OTLP metrics HTTP exporter for span metrics Jun 16, 2026
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch 5 times, most recently from 73fa14b to 8b7e127 Compare June 18, 2026 16:22
@rachelyangdog
rachelyangdog marked this pull request as ready for review June 18, 2026 16:25
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.07018% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.52%. Comparing base (cc250e4) to head (8b7e127).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
ddtrace/tracer/otlp_metrics_exporter.go 73.01% 12 Missing and 5 partials ⚠️
ddtrace/tracer/stats_to_otlp_metrics.go 90.20% 8 Missing and 6 partials ⚠️
internal/config/config_helpers.go 92.10% 1 Missing and 2 partials ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
internal/config/config.go 61.90% <100.00%> (-2.29%) ⬇️
internal/config/config_helpers.go 65.47% <92.10%> (+2.11%) ⬆️
ddtrace/tracer/stats_to_otlp_metrics.go 90.20% <90.20%> (ø)
ddtrace/tracer/otlp_metrics_exporter.go 73.01% <73.01%> (ø)

... and 291 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b7e127f92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ddtrace/tracer/stats_to_otlp_metrics.go Outdated
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch 3 times, most recently from 0591498 to b6998bf Compare June 22, 2026 15:09
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch from b6998bf to 053dd7f Compare July 1, 2026 19:30
@rachelyangdog
rachelyangdog changed the base branch from main to rachel.yang/otlp-span-metrics-conversion July 1, 2026 19:41

@mtoffl01 mtoffl01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks similar to the existing otlp transport that already exists in ddtrace/tracer/otlp_transport.go. Can you reuse that functionality?

otlpMetricsExporter can hold a reference to a *otlpTransport

@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-conversion branch from d29a1f7 to 5825b24 Compare July 2, 2026 14:29
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch from 053dd7f to 98e8123 Compare July 2, 2026 14:29
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-conversion branch from 5825b24 to 5ee761f Compare July 2, 2026 14:50
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch from 98e8123 to 167f231 Compare July 2, 2026 14:50
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-conversion branch from 5ee761f to d09448e Compare July 2, 2026 14:59
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch from 167f231 to 6050a97 Compare July 2, 2026 14:59
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch 2 times, most recently from 1173824 to d1699f0 Compare July 2, 2026 19:49
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-conversion branch from 05cb3d2 to 4a7fb1d Compare July 6, 2026 20:09
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch 2 times, most recently from 9c0fc21 to 1eca7a0 Compare July 6, 2026 20:32
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-conversion branch from 5124a8e to 842ce96 Compare July 7, 2026 18:11
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch from 1eca7a0 to faba486 Compare July 7, 2026 18:11
Comment thread ddtrace/tracer/otlp_metrics_exporter.go
Comment thread internal/config/config.go Outdated
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-conversion branch from 842ce96 to 20afb56 Compare July 16, 2026 15:07

@mtoffl01 mtoffl01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly nits, but overall I'd say - lets try to introduce as little new code as possible. Some of this logic already exists, or already exists in some other form, and can be modified in order to be shared across the repo rather than recreated

Comment thread ddtrace/tracer/otlp_metrics_exporter.go Outdated
cfg *internalconfig.Config
}

func newOTLPMetricsExporter(cfg *internalconfig.Config) *otlpMetricsExporter {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does newOTLPMetricsExporter need all of cfg? Can't it accept the parameters it needs explicitly/only?

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.

cfg is used across both construction and the export() call path. there are 7 fields in total: AgentTimeout, OTLPMetricsURL, OTLPMetricsHeaders, OTLPMetricsProtocol at construction, plus OTelSemanticsEnabled, ReportHostname, Hostname inside buildOTLPMetricsRequest. Passing those explicitly would produce a 7-parameter constructor, which is harder to read and maintain than the single cfg argument. Storing cfg on the struct also avoids threading those values through separately on every export() call.

This matches how newOTLPTraceWriter is structured. it also takes the full config rather than individual fields.

body, err = marshalExportRequestJSON(rms)
contentType = otlpMetricsContentTypeJSON
} else {
body, err = marshalExportRequestProto(rms)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're implicitly defaulting to protobuf unless "http/json" was specified. Does internalconfig already inform the user that anything other than json or protobuf will be dropped/default to protobuf?

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.

Yes, internalconfig already handles this. validateOTLPProtocol is called at config load time for both OTEL_EXPORTER_OTLP_METRICS_PROTOCOL and (now) OTEL_EXPORTER_OTLP_PROTOCOL, and logs a warning naming the specific env var when an unsupported value is set, then falls back to the default. So by the time OTLPMetricsProtocol() is read in the exporter, it's guaranteed to be either "http/json" or "http/protobuf".

Also worth noting: the default was changed to "http/json" in this PR to align with the spec's transport section ("HTTP/JSON as the fallback protocol"), so the implicit behavior now favors JSON rather than protobuf.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. it feels like this block is duplicating some of that.

Comment thread ddtrace/tracer/otlp_writer.go Outdated
// gs.Name (the Datadog operation name, e.g. "web.request") is intentionally
// omitted in OTel mode — it has no OTel semconv equivalent and is only
// emitted as datadog.operation.name in default mode below.
if gs.Resource != "" {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks similar to the logic in span_to_otlp.go. is there any logic we can deduplicate - define once and share?

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.

buildDataPointAttributes and convertSpanAttributes (or the span attribute logic in span_to_otlp.go) operate on different input types: buildDataPointAttributes takes a *pb.ClientGroupedStats (pre-aggregated stats from the concentrator, with typed fields like HTTPMethod, HTTPStatusCode, GRPCStatusCode), while the span conversion takes a *Span with a raw meta/metrics map. There's no shared field access or control flow that would survive extraction into a shared helper.

The deduplication that was possible like the resource attribute construction (service.name, telemetry.sdk.*, deployment.environment.name, service.version) was already extracted into buildBaseResourceAttrs in this PR and is shared between buildMetricsResource and buildResource in span_to_otlp.go.

Comment thread internal/config/config_helpers.go Outdated
Base automatically changed from rachel.yang/otlp-span-metrics-conversion to main July 21, 2026 14:47
rachelyangdog and others added 6 commits July 21, 2026 10:54
Adds otlpMetricsExporter which converts a ClientStatsPayload to an
ExportMetricsServiceRequest, marshals it as HTTP/JSON (protojson) or
HTTP/protobuf based on OTEL_EXPORTER_OTLP_METRICS_PROTOCOL, and POSTs
it to the configured OTLP metrics endpoint. The protocol config field
defaults to http/protobuf per the OTel spec; system tests set http/json
explicitly via OTEL_EXPORTER_OTLP_METRICS_PROTOCOL=http/json.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…cs/v1

Importing go.opentelemetry.io/proto/otlp/collector/metrics/v1 in the
test binary triggered the grpc-gateway -> genproto ambiguous-import
error when confluent-kafka-go (which requires the old monolithic
genproto) was in the same build graph. Replace the collector import
with a protowire decode of ExportMetricsServiceRequest field 1 directly
into the already-imported ResourceMetrics type.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Request

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
otlpMetricsExporter now holds a *otlpTransport instead of duplicating
the HTTP client/send logic. otlpTransport.send accepts a contentType
parameter so the metrics exporter can use it for both JSON and protobuf.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… helpers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…thValidator + OTLP_PROTOCOL fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch from 7e1dd9d to 5df63a6 Compare July 21, 2026 14:56
rachelyangdog and others added 4 commits July 21, 2026 10:57
…and resolveOTLPTraceURL

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng literal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rce attribute logic

Both buildResource (trace exports) and buildMetricsResource (metrics exports)
built the same telemetry.sdk.* + service.* baseline attributes. Extract a shared
buildBaseResourceAttrs helper in span_to_otlp.go and have both callers use it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nsport.go

Move otlpContentTypeJSON and otlpContentTypeProto to otlp_transport.go
(where otlpTransport.send takes the content type) and remove the duplicate
definitions from otlp_metrics_exporter.go. Update all callers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DataDog DataDog deleted a comment from github-actions Bot Jul 21, 2026
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Config Audit

PACKAGE: contrib/cloud.google.com/go/pubsubtrace
  STATUS      CONFIG                                            CALL_SITES
  UNMIGRATED  DD_GOOGLE_CLOUD_PUBSUB_PROPAGATION_AS_SPAN_LINKS  1

PACKAGE: contrib/confluentinc/confluent-kafka-go/kafkatrace
  STATUS      CONFIG                            CALL_SITES
  UNMIGRATED  DD_TRACE_KAFKA_ANALYTICS_ENABLED  1

PACKAGE: ddtrace/opentelemetry/log
  STATUS      CONFIG                            CALL_SITES
  STILL_READ  DD_AGENT_HOST                     2
  STILL_READ  DD_ENV                            1
  STILL_READ  DD_SERVICE                        1
  STILL_READ  DD_TAGS                           1
  STILL_READ  DD_TRACE_AGENT_URL                2
  STILL_READ  DD_TRACE_REPORT_HOSTNAME          1
  STILL_READ  DD_VERSION                        1
  STILL_READ  OTEL_EXPORTER_OTLP_ENDPOINT       4
  STILL_READ  OTEL_EXPORTER_OTLP_HEADERS        2
  STILL_READ  OTEL_EXPORTER_OTLP_PROTOCOL       2
  UNMIGRATED  DD_HOSTNAME                       1
  UNMIGRATED  OTEL_BLRP_EXPORT_TIMEOUT          1
  UNMIGRATED  OTEL_BLRP_MAX_EXPORT_BATCH_SIZE   1
  UNMIGRATED  OTEL_BLRP_MAX_QUEUE_SIZE          1
  UNMIGRATED  OTEL_BLRP_SCHEDULE_DELAY          1
  UNMIGRATED  OTEL_EXPORTER_OTLP_LOGS_ENDPOINT  4
  UNMIGRATED  OTEL_EXPORTER_OTLP_LOGS_HEADERS   2
  UNMIGRATED  OTEL_EXPORTER_OTLP_LOGS_PROTOCOL  2
  UNMIGRATED  OTEL_EXPORTER_OTLP_LOGS_TIMEOUT   1
  UNMIGRATED  OTEL_EXPORTER_OTLP_TIMEOUT        1
  UNMIGRATED  OTEL_RESOURCE_ATTRIBUTES          1

PACKAGE: ddtrace/opentelemetry/metric
  STATUS      CONFIG                                             CALL_SITES
  STILL_READ  DD_AGENT_HOST                                      2
  STILL_READ  DD_ENV                                             1
  STILL_READ  DD_METRICS_OTEL_ENABLED                            1
  STILL_READ  DD_SERVICE                                         1
  STILL_READ  DD_TAGS                                            1
  STILL_READ  DD_TRACE_AGENT_URL                                 2
  STILL_READ  DD_TRACE_REPORT_HOSTNAME                           1
  STILL_READ  DD_VERSION                                         1
  STILL_READ  OTEL_EXPORTER_OTLP_ENDPOINT                        2
  STILL_READ  OTEL_EXPORTER_OTLP_HEADERS                         1
  STILL_READ  OTEL_EXPORTER_OTLP_METRICS_ENDPOINT                2
  STILL_READ  OTEL_EXPORTER_OTLP_METRICS_HEADERS                 1
  STILL_READ  OTEL_EXPORTER_OTLP_METRICS_PROTOCOL                2
  STILL_READ  OTEL_EXPORTER_OTLP_PROTOCOL                        2
  STILL_READ  OTEL_METRICS_EXPORTER                              1
  UNMIGRATED  DD_HOSTNAME                                        1
  UNMIGRATED  OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE  1
  UNMIGRATED  OTEL_EXPORTER_OTLP_TIMEOUT                         1
  UNMIGRATED  OTEL_RESOURCE_ATTRIBUTES                           1
  UNMIGRATED  OTEL_SERVICE_NAME                                  1

PACKAGE: ddtrace/tracer
  STATUS      CONFIG                                    CALL_SITES
  STILL_READ  DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT     1
  STILL_READ  DD_TRACE_PROPAGATION_EXTRACT_FIRST        1
  STILL_READ  DD_TRACE_PROPAGATION_STYLE_EXTRACT        1
  STILL_READ  DD_TRACE_PROPAGATION_STYLE_INJECT         1
  UNMIGRATED  DD_APM_TRACING_ENABLED                    1
  UNMIGRATED  DD_LLMOBS_AGENTLESS_ENABLED               1
  UNMIGRATED  DD_LLMOBS_ENABLED                         1
  UNMIGRATED  DD_LLMOBS_ML_APP                          1
  UNMIGRATED  DD_LLMOBS_PROJECT_NAME                    1
  UNMIGRATED  DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED  1
  UNMIGRATED  DD_TRACE_DEBUG_SEELOG_WORKAROUND          1
  UNMIGRATED  OTEL_TRACES_SAMPLER_ARG                   1

PACKAGE: instrumentation
  STATUS      CONFIG                                       CALL_SITES
  STILL_READ  DD_DATA_STREAMS_ENABLED                      1
  UNMIGRATED  DD_API_SECURITY_ENDPOINT_COLLECTION_ENABLED  1

PACKAGE: instrumentation/graphql
  STATUS      CONFIG                             CALL_SITES
  UNMIGRATED  DD_TRACE_GRAPHQL_ERROR_EXTENSIONS  1

PACKAGE: instrumentation/httptrace
  STATUS      CONFIG                                                 CALL_SITES
  UNMIGRATED  DD_GOOGLE_CLOUD_PUBSUB_PROPAGATION_AS_SPAN_LINKS       1
  UNMIGRATED  DD_TRACE_BAGGAGE_TAG_KEYS                              1
  UNMIGRATED  DD_TRACE_CLIENT_IP_ENABLED                             1
  UNMIGRATED  DD_TRACE_HTTP_SERVER_ERROR_STATUSES                    1
  UNMIGRATED  DD_TRACE_HTTP_URL_QUERY_STRING_ALLOWLIST               1
  UNMIGRATED  DD_TRACE_HTTP_URL_QUERY_STRING_ALLOWLIST_CLIENT        1
  UNMIGRATED  DD_TRACE_HTTP_URL_QUERY_STRING_ALLOWLIST_SERVER        1
  UNMIGRATED  DD_TRACE_HTTP_URL_QUERY_STRING_DISABLED                1
  UNMIGRATED  DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED               1
  UNMIGRATED  DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP               2
  UNMIGRATED  DD_TRACE_RESOURCE_RENAMING_ALWAYS_SIMPLIFIED_ENDPOINT  1
  UNMIGRATED  DD_TRACE_RESOURCE_RENAMING_ENABLED                     1

PACKAGE: instrumentation/internal/namingschema
  STATUS      CONFIG                                             CALL_SITES
  STILL_READ  DD_SERVICE                                         1
  STILL_READ  DD_TRACE_SPAN_ATTRIBUTE_SCHEMA                     1
  UNMIGRATED  DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED  1

PACKAGE: internal
  STATUS      CONFIG                         CALL_SITES
  STILL_READ  DD_AGENT_HOST                  1
  STILL_READ  DD_TAGS                        1
  STILL_READ  DD_TRACE_AGENT_PORT            1
  STILL_READ  DD_TRACE_AGENT_URL             1
  UNMIGRATED  DD_EXTERNAL_ENV                1
  UNMIGRATED  DD_GIT_COMMIT_SHA              1
  UNMIGRATED  DD_GIT_REPOSITORY_URL          1
  UNMIGRATED  DD_TRACE_GIT_METADATA_ENABLED  1

PACKAGE: internal/appsec
  STATUS      CONFIG           CALL_SITES
  UNMIGRATED  DD_APPSEC_RULES  1

PACKAGE: internal/appsec/config
  STATUS      CONFIG                                                CALL_SITES
  UNMIGRATED  DD_API_SECURITY_DOWNSTREAM_BODY_ANALYSIS_SAMPLE_RATE  1
  UNMIGRATED  DD_API_SECURITY_ENABLED                               1
  UNMIGRATED  DD_API_SECURITY_MAX_DOWNSTREAM_REQUEST_BODY_ANALYSIS  1
  UNMIGRATED  DD_API_SECURITY_PROXY_SAMPLE_RATE                     1
  UNMIGRATED  DD_API_SECURITY_REQUEST_SAMPLE_RATE                   1
  UNMIGRATED  DD_API_SECURITY_SAMPLE_DELAY                          1
  UNMIGRATED  DD_APM_TRACING_ENABLED                                1
  UNMIGRATED  DD_APPSEC_AGENTIC_ONBOARDING                          1
  UNMIGRATED  DD_APPSEC_ENABLED                                     1
  UNMIGRATED  DD_APPSEC_RASP_ENABLED                                1
  UNMIGRATED  DD_APPSEC_RULES                                       1
  UNMIGRATED  DD_APPSEC_SCA_ENABLED                                 1
  UNMIGRATED  DD_APPSEC_TRACE_RATE_LIMIT                            1
  UNMIGRATED  DD_APPSEC_WAF_TIMEOUT                                 1

PACKAGE: internal/appsec/listener/httpsec
  STATUS      CONFIG                     CALL_SITES
  UNMIGRATED  DD_TRACE_CLIENT_IP_HEADER  1

PACKAGE: internal/bazel
  STATUS      CONFIG                                  CALL_SITES
  UNMIGRATED  DD_TEST_OPTIMIZATION_MANIFEST_FILE      1
  UNMIGRATED  DD_TEST_OPTIMIZATION_PAYLOADS_IN_FILES  1

PACKAGE: internal/civisibility/envconfig
  STATUS      CONFIG                   CALL_SITES
  STILL_READ  DD_CIVISIBILITY_ENABLED  1

PACKAGE: internal/civisibility/integrations
  STATUS      CONFIG                                               CALL_SITES
  STILL_READ  DD_SERVICE                                           1
  STILL_READ  DD_TRACE_DEBUG                                       1
  UNMIGRATED  DD_CIVISIBILITY_CODE_COVERAGE_REPORT_UPLOAD_ENABLED  1
  UNMIGRATED  DD_CIVISIBILITY_FLAKY_RETRY_COUNT                    1
  UNMIGRATED  DD_CIVISIBILITY_FLAKY_RETRY_ENABLED                  1
  UNMIGRATED  DD_CIVISIBILITY_GIT_UPLOAD_ENABLED                   1
  UNMIGRATED  DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED     1
  UNMIGRATED  DD_CIVISIBILITY_SUBTEST_FEATURES_ENABLED             1
  UNMIGRATED  DD_CIVISIBILITY_TOTAL_FLAKY_RETRY_COUNT              1
  UNMIGRATED  DD_TEST_MANAGEMENT_ATTEMPT_TO_FIX_RETRIES            1
  UNMIGRATED  DD_TEST_MANAGEMENT_ENABLED                           1

PACKAGE: internal/civisibility/integrations/gotesting
  STATUS      CONFIG                                                           CALL_SITES
  UNMIGRATED  DD_CIVISIBILITY_INTERNAL_PARALLEL_EARLY_FLAKE_DETECTION_ENABLED  1
  UNMIGRATED  DD_TEST_MANAGEMENT_ENABLED                                       1

PACKAGE: internal/civisibility/integrations/logs
  STATUS      CONFIG                        CALL_SITES
  UNMIGRATED  DD_CIVISIBILITY_LOGS_ENABLED  1

PACKAGE: internal/civisibility/utils
  STATUS      CONFIG                              CALL_SITES
  STILL_READ  DD_SERVICE                          1
  UNMIGRATED  DD_ACTION_EXECUTION_ID              1
  UNMIGRATED  DD_PIPELINE_EXECUTION_ID            1
  UNMIGRATED  DD_TEST_OPTIMIZATION_ENV_DATA_FILE  1
  UNMIGRATED  DD_TEST_SESSION_NAME                1

PACKAGE: internal/civisibility/utils/net
  STATUS      CONFIG                             CALL_SITES
  STILL_READ  DD_API_KEY                         1
  STILL_READ  DD_CIVISIBILITY_AGENTLESS_ENABLED  1
  STILL_READ  DD_CIVISIBILITY_AGENTLESS_URL      1
  STILL_READ  DD_ENV                             1
  STILL_READ  DD_SERVICE                         1
  STILL_READ  DD_SITE                            1
  STILL_READ  DD_TAGS                            1
  STILL_READ  DD_VERSION                         1
  UNMIGRATED  DD_CODE_COVERAGE_FLAGS             1

PACKAGE: internal/civisibility/utils/telemetry
  STATUS      CONFIG                                         CALL_SITES
  UNMIGRATED  DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER  1

PACKAGE: internal/globalconfig
  STATUS      CONFIG                           CALL_SITES
  UNMIGRATED  DD_INSTRUMENTATION_INSTALL_ID    1
  UNMIGRATED  DD_INSTRUMENTATION_INSTALL_TIME  1
  UNMIGRATED  DD_INSTRUMENTATION_INSTALL_TYPE  1

PACKAGE: internal/hostname
  STATUS      CONFIG       CALL_SITES
  UNMIGRATED  DD_HOSTNAME  1

PACKAGE: internal/namingschema
  STATUS      CONFIG                                             CALL_SITES
  STILL_READ  DD_SERVICE                                         1
  STILL_READ  DD_TRACE_SPAN_ATTRIBUTE_SCHEMA                     1
  UNMIGRATED  DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED  1

PACKAGE: internal/processtags
  STATUS      CONFIG                                          CALL_SITES
  UNMIGRATED  DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED  1

PACKAGE: internal/remoteconfig
  STATUS      CONFIG                                  CALL_SITES
  STILL_READ  DD_ENV                                  1
  UNMIGRATED  DD_RC_TUF_ROOT                          1
  UNMIGRATED  DD_REMOTE_CONFIGURATION_ENABLED         1
  UNMIGRATED  DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS  1

PACKAGE: internal/stacktrace
  STATUS      CONFIG                           CALL_SITES
  UNMIGRATED  DD_APPSEC_MAX_STACK_TRACE_DEPTH  1
  UNMIGRATED  DD_APPSEC_STACK_TRACE_ENABLED    1

PACKAGE: internal/telemetry
  STATUS      CONFIG                                             CALL_SITES
  STILL_READ  DD_API_KEY                                         1
  STILL_READ  DD_SITE                                            1
  UNMIGRATED  DD_API_SECURITY_ENDPOINT_COLLECTION_MESSAGE_LIMIT  1
  UNMIGRATED  DD_INSTRUMENTATION_TELEMETRY_ENABLED               1
  UNMIGRATED  DD_TELEMETRY_DEBUG                                 1
  UNMIGRATED  DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED         1
  UNMIGRATED  DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL           1
  UNMIGRATED  DD_TELEMETRY_HEARTBEAT_INTERVAL                    1
  UNMIGRATED  DD_TELEMETRY_LOG_COLLECTION_ENABLED                1
  UNMIGRATED  DD_TELEMETRY_METRICS_ENABLED                       1

PACKAGE: openfeature
  STATUS      CONFIG                                                     CALL_SITES
  STILL_READ  DD_ENV                                                     2
  STILL_READ  DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED                  1
  STILL_READ  DD_SERVICE                                                 2
  STILL_READ  DD_VERSION                                                 2
  UNMIGRATED  DD_EXPERIMENTAL_FLAGGING_PROVIDER_SPAN_ENRICHMENT_ENABLED  1
  UNMIGRATED  DD_FLAGGING_EVALUATION_COUNTS_ENABLED                      1

PACKAGE: profiler
  STATUS      CONFIG                                    CALL_SITES
  STILL_READ  DD_API_KEY                                1
  STILL_READ  DD_ENV                                    1
  STILL_READ  DD_SERVICE                                1
  STILL_READ  DD_SITE                                   1
  STILL_READ  DD_TAGS                                   1
  STILL_READ  DD_TRACE_STARTUP_LOGS                     1
  STILL_READ  DD_VERSION                                1
  UNMIGRATED  DD_PROFILING_AGENTLESS                    1
  UNMIGRATED  DD_PROFILING_DEBUG_COMPRESSION_SETTINGS   1
  UNMIGRATED  DD_PROFILING_DELTA                        1
  UNMIGRATED  DD_PROFILING_ENABLED                      3
  UNMIGRATED  DD_PROFILING_ENDPOINT_COUNT_ENABLED       1
  UNMIGRATED  DD_PROFILING_EXECUTION_TRACE_ENABLED      1
  UNMIGRATED  DD_PROFILING_EXECUTION_TRACE_LIMIT_BYTES  1
  UNMIGRATED  DD_PROFILING_EXECUTION_TRACE_PERIOD       1
  UNMIGRATED  DD_PROFILING_FLUSH_ON_EXIT                1
  UNMIGRATED  DD_PROFILING_OUTPUT_DIR                   1
  UNMIGRATED  DD_PROFILING_UPLOAD_TIMEOUT               1
  UNMIGRATED  DD_PROFILING_URL                          1

@rachelyangdog
rachelyangdog force-pushed the rachel.yang/otlp-span-metrics-transport branch from 14124c6 to bbdfee2 Compare July 21, 2026 15:30
rachelyangdog and others added 3 commits July 21, 2026 15:01
- Use internal.DefaultHTTPClient instead of bare &http.Client{} in
  newOTLPMetricsExporter for connection pooling and proxy support
- Validate OTEL_EXPORTER_OTLP_PROTOCOL fallback through validateOTLPProtocol;
  pass env var name to warning message so the right variable is named
- Change default OTLP metrics protocol to http/json per spec transport section
- Remove rpc.method attribute (removed from RFC spec June 25)
- Rename _DD_TRACE_METRICS_OTEL_FLUSH_INTERVAL to _DD_TRACE_STATS_INTERVAL
  to match RFC-specified name used across all 5 SDK implementations
- Document intentional no-retry behavior on metrics export
- Document datadog.origin fidelity gap (proto only has Synthetics bool)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Aligns the OTLPMetricsProtocol fallback with dd-trace-java's hardcoded
production default and the RFC's revised FR10 (protobuf now satisfies
the transport requirement; JSON support is no longer mandatory). The
env vars (OTEL_EXPORTER_OTLP_METRICS_PROTOCOL, OTEL_EXPORTER_OTLP_PROTOCOL)
remain fully configurable to either value.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
body, err = marshalExportRequestJSON(rms)
contentType = otlpMetricsContentTypeJSON
} else {
body, err = marshalExportRequestProto(rms)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. it feels like this block is duplicating some of that.

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.

2 participants