Efficient Trace Payload Protocol (v1 protocol) by AlexeyKuznetsov-DD · Pull Request #10801 · DataDog/dd-trace-java · GitHub
Skip to content

Efficient Trace Payload Protocol (v1 protocol)#10801

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 89 commits into
masterfrom
alexeyk/protocol-v1-1
Apr 23, 2026
Merged

Efficient Trace Payload Protocol (v1 protocol)#10801
gh-worker-dd-mergequeue-cf854d[bot] merged 89 commits into
masterfrom
alexeyk/protocol-v1-1

Conversation

@AlexeyKuznetsov-DD

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

  • Implements support for the Datadog Agent Efficient Trace Payload Protocol v1.0 (v1.0/traces endpoint) in the Java tracer.
  • Introduces TraceMapperV1, a new serializer that encodes traces in the v1 msgpack format with a flat attribute model, string table deduplication, and typed attribute values.
  • Adds a ProtocolVersion enum to cleanly represent v0.4, v0.5, and v1.0 protocols including their fallback endpoint chains.
  • Updates DDAgentFeaturesDiscovery to probe endpoints based on the configured protocol version.

Motivation

Protocol v1 is a more efficient wire format: it deduplicates repeated strings via a string table, uses typed attribute values (string/bool/float/int/bytes/array). This reduces payload size and provides a cleaner foundation for future span model evolution. The implementation falls back gracefully to v0.4 when the agent does not advertise v1 support.

Additional Notes

Protocol v1 spec
System test passed both on GitHub and GitLab.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Mar 10, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added tag: do not merge Do not merge changes comp: core Tracer core labels Mar 10, 2026
@pr-commenter

pr-commenter Bot commented Mar 11, 2026

Copy link
Copy Markdown

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD changed the title Protocol v1 Efficient Trace Payload Protocol (v1 protocol) Apr 22, 2026
Comment thread dd-trace-api/src/main/java/datadog/trace/api/ConfigDefaults.java Outdated
Comment thread dd-trace-api/src/main/java/datadog/trace/api/ProtocolVersion.java Outdated

@mcculls mcculls 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.

LGTM, thanks for improving the protocol selection - and the test coverage

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Apr 23, 2026

Copy link
Copy Markdown

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 9aedff2 into master Apr 23, 2026
571 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the alexeyk/protocol-v1-1 branch April 23, 2026 16:30
@github-actions github-actions Bot added this to the 1.62.0 milestone Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core tag: do not merge Do not merge changes type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants