Repository navigation
Description
Tracer Version(s)
2.12.0 (upgraded from 2.1.0). Built with Orchestrion v1.15.0.
Go Version(s)
go version go1.27.4 linux/amd64 (previous build: go1.23.2)
Bug Report
After we upgraded from dd-trace-go v2.1.0 to v2.12.0, about 94% of the spans the Agent sent stopped showing up in Datadog. The tracer was using the v1.0 trace protocol, which is the default since v2.10.0.
- The tracer and Agent showed no errors.
- The Agent sampled and sent everything.
- Setting
DD_TRACE_AGENT_PROTOCOL_VERSION=0.4, with the tracer still on v2.12.0, restored ingestion immediately and completely.
Opened as a public record and workaround for other users. Datadog support is already investigating this in ticket #3072800.
Setup
- Go HTTP API (gin v1.10.0, database/sql with go-sql-driver/mysql v1.10.2, go-redis v9, aws-sdk-go-v2), instrumented only through Orchestrion (
orchestrion go build). The Orchestrion integrations arecontrib/{gin-gonic/gin,database/sql,redis/go-redis.v9,aws/aws-sdk-go-v2}/v2at v2.12.0. - Kubernetes (EKS, amd64). The node Agent is installed with the Helm chart
datadog3.253.0. The tracer reaches the Agent over UDS:unix:///var/run/datadog/apm.socket. - Agent 7.84.1 when the problem started. We later upgraded to 7.85.5, which did not help (see the timeline).
- The same upgrade also moved Go from 1.23.2 to 1.27 and go-sql-driver/mysql from v1.8.1 to v1.10.2.
Sampling configuration
- Set only as environment variables on the deployments. Nothing is set in code.
- Remote Configuration is disabled, so Ingestion Control remote rules and Adaptive Sampling do not apply.
DD_TRACE_SAMPLING_RULES='[{"sample_rate":1}]' # 100% ingestion DD_REMOTE_CONFIGURATION_ENABLED=false DD_TRACE_RATE_LIMIT=500 # two of the four clusters; the others use the default DD_DBM_PROPAGATION_MODE=full DD_TRACE_ENABLED=true - No sampling overrides on the Agent (no
DD_APM_MAX_TPS,DD_APM_TARGET_TPSor probabilistic sampler).
Timeline (UTC)
| When | Change | Effect |
|---|---|---|
| 2026-11-24 08:00–10:00 | Cluster 1 rolled out v2.12.0 | Loss starts on cluster 1 |
| 2026-11-25 00:50–01:10 | Clusters 2–4 rolled out v2.12.0 | Loss starts on clusters 2–4; Go spans move from /v0.4/traces to /v1.0/traces (endpoint_version:v1.0) |
| 2026-11-25 06:57–07:50 | Agent 7.84.1 → 7.85.5 on all clusters | No change |
| 2026-11-25 08:31–08:35 | DD_TRACE_AGENT_PROTOCOL_VERSION=0.4 on all Go services (tracer still v2.12.0) |
Full recovery right away |
The loss started on each cluster at the moment that cluster rolled out v2.12.0.
Ingested ÷ sent
Ingested is datadog.estimated_usage.apm.ingested_spans. Sent is datadog.trace_agent.trace_writer.spans. Org-wide totals:
| Window (UTC, 2026-11-25) | Protocol / Agent | Ingested ÷ sent |
|---|---|---|
| 00:00–00:55 | v0.4, tracer v2.1.0 (most traffic) | 98.5% |
| 05:00–07:45 | v1.0, Agent 7.84.1 | 6.0% |
| 07:55–08:28 | v1.0, Agent 7.85.5 | 5.7% |
| 08:36– | v0.4, tracer v2.12.0 | 100.6% |
What the Agent showed while spans were being lost
- The sampler kept everything (kept = seen, all priority 2).
- Writer payload count and bytes were the same as before the switch.
- The writer had 0 errors and 0 retries, and there were no refused payloads.
- No spans leaked into another
env. - The loss follows traffic. Across the four production clusters in order of traffic, the loss was about 100%, 89%, 65% and 50%. A very low-traffic dev environment barely showed it.
- Node.js (dd-trace-js) spans in the same traces stopped showing up too, even though the Node.js services kept sending to the Agent over v0.4.
- Other ingestion numbers fell by similar amounts:
estimated_usageingested spans: from ~9.8M to ~0.78M per 10 minutes.- Usage API ingested bytes: from ~51 GB/h to ~9 GB/h.
- Indexed HTTP spans: from ~7.8k to ~340 per 5 minutes.
So spans appear to be dropped after the Agent forwards the v1.0 data. That points at the v1 payload contents or at intake, not at sampling.
Why this is hard to notice
- Nothing on the tracer side shows the loss.
- The v2.12.0 startup log does not say which trace protocol is in use.
trace_protocolandv1_protocol_availablefrom feat(ddtrace/tracer): diagnose and report the trace protocol in use #5150 are onmainbut not in the v2.12.0 release (feat(ddtrace/tracer): diagnose and report the trace protocol in use #5168 is still open). - Users who upgrade only see their APM volume fall.
Possibly related (not confirmed; we saw no refused payloads):
- fix(ddtrace/tracer): count every request body before payload pool return #5944: a late request-body close can return a pooled
payloadV1to thesync.Poolwhile a retry or stale-connection replay still reads it. v2.12.0 has the samepayloadV1Pooland theGetBodyreplay path. - contrib/gofiber/fiber.v2: request-buffer reuse corrupts span methods and v1 payloads #5433: a v1 payload with corrupted string-table references makes the Agent reject the whole batch.
Questions
- Why were v1.0 payloads from v2.12.0 dropped after the Agent forwarded them?
- Is it safe to go back to the default protocol, and with which Agent and tracer versions?
- Until then, should the v1.0 default be reconsidered, or the protocol in use be shown in the startup log of a release?
Workaround
DD_TRACE_AGENT_PROTOCOL_VERSION=0.4
Reproduction Code
We do not have a minimal repro. The loss only showed up at production traffic and grew with traffic, and a low-traffic dev environment barely showed it. Conditions:
dd-trace-go v2.12.0 via Orchestrion v1.15.0 (gin + database/sql + go-redis v9 + aws-sdk-go-v2)
Agent 7.84.1 or 7.85.5 (advertises /v1.0/traces), UDS transport
DD_TRACE_SAMPLING_RULES='[{"sample_rate":1}]', DD_REMOTE_CONFIGURATION_ENABLED=false
Default trace protocol (no DD_TRACE_AGENT_PROTOCOL_VERSION) -> ~94% of sent spans missing
DD_TRACE_AGENT_PROTOCOL_VERSION=0.4 -> ~100% ingested
Error Logs
During the loss window there were no tracer errors or warnings beyond what we see in normal operation.
From 2026-11-24 08:00 to 2026-11-25 08:40 UTC, all prod pods logged only these:
- Startup warnings:
telemetry: metric name "trace_filter.spans_dropped" ... is not a known metricandappsec: not enabled. lost N traces: Post ".../v1.0/traces": dial unix /var/run/datadog/apm.socket: connect: ...(35 lines) and the matching stats dial errors. All of them fall between 06:58 and 07:50 UTC, while the Agent pods were restarting for the upgrade.lost N traces: payload-too-large, at about 2 per hour. This was already happening at the same rate on v2.1.0 with v0.4, and it continues after the switch back to 0.4, so it is not related.
Startup line during the loss (v1.0, Agent 7.84.1). Excerpt; identifiers replaced:
Datadog Tracer v2.12.0 INFO: DATADOG TRACER CONFIGURATION {"version":"v2.12.0","lang_version":"go1.27.4","env":"prod","service":"<service>",
"agent_url":"unix:///var/run/datadog/apm.socket","sample_rate":"NaN","sample_rate_limit":"500",
"trace_sampling_rules":[{"sample_rate":1}],
"agent_features":{"DropP0s":true,"Stats":true,"StatsdPort":8125,"AgentVersion":"7.84.1"},
"orchestrion":{"enabled":true,"metadata":{"version":"v1.15.0"}},"dd_version":"<app-version>",
"propagation_style_inject":"datadog,tracecontext,baggage","partial_flush_enabled":false, ...}
After the fix (DD_TRACE_AGENT_PROTOCOL_VERSION=0.4), the startup line is the same except "AgentVersion":"7.85.5". Neither line shows the protocol in use.
Go Env Output
Built in CI: golang:1.27-alpine3.24 image, CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GOWORK=off orchestrion go build -a -installsuffix cgo. The runtime image is alpine:3.24.
Activity