Skip to content

v1: serialize span links as structured data and honor baggage tag config.#11810

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
alexeyk/refactor-v1-baggage-and-span-links
Jul 2, 2026
Merged

v1: serialize span links as structured data and honor baggage tag config.#11810
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
alexeyk/refactor-v1-baggage-and-span-links

Conversation

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor

What Does This Do

Replaces the v1 trace payload's CoreSpan.processTagsAndBaggage(consumer, injectLinksAsTags, injectBaggageAsTags) with a purpose-named processTagsAndBaggageWithStructuredLinks(consumer):

  • Span links stay structuredv1 serializes links as first-class data and no longer flattens them into the _dd.span_links tag (injectLinksAsTags = false).
  • Baggage-as-tags now follows tracer configv1 previously hard-coded injectBaggageAsTags = false; it now respects the configured value, aligning v1 with the v0.4/V0.5 paths.
  • Drops the now-unused 3-arg overload from CoreSpan (replaced by a default method), DDSpan, DDSpanContext, and the test doubles (SimpleSpan, TraceGenerator).

On the test side:

  • Adds real-span v1 coverage in DDSpanSerializationTest.java (structured links not flattened; configured baggage tags).
  • Extracts the duplicated msgpack v1 decoder into a shared V1PayloadReader, now used by both DDSpanSerializationTest and TraceMapperV1PayloadTest.

Motivation

system-tests failed on my branch when I enabled v1 by default for tests in Test_Headers_Baggage_Span_Tags.

Additional Notes

Verified:

  • ./gradlew :dd-trace-core:test --tests DDSpanSerializationTest --tests TraceMapperV1PayloadTest passes; spotlessApply clean.
  • system-tests passed locally: DD_TRACE_DEBUG=true TEST_LIBRARY=java ./run.sh PARAMETRIC tests/parametric/test_headers_baggage.py --force-dd-trace-debug with both modes: v1 or v04 enabled.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Jun 30, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring labels Jun 30, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD marked this pull request as ready for review June 30, 2026 18:23
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD requested a review from a team as a code owner June 30, 2026 18:23
@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jul 1, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-01 19:28:13 UTC ℹ️ Start processing command /merge


2026-07-01 19:28:18 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-07-01 21:28:53 UTCMergeQueue: The build pipeline has timeout

The merge request has been interrupted because the build 5239872126070858024 took longer than expected. The current limit for the base branch 'master' is 120 minutes.

Possible reasons:

  • some mandatory checkruns are failing:
    • Check pull request labels
    • Check pull requests
    • Enforce Groovy migration

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jul 1, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-01 22:25:11 UTC ℹ️ Start processing command /merge


2026-07-01 22:25:15 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-07-02 00:25:33 UTCMergeQueue: The build pipeline has timeout

The merge request has been interrupted because the build 7051895293262795330 took longer than expected. The current limit for the base branch 'master' is 120 minutes.

Possible reasons:

  • some mandatory checkruns are failing:
    • Check pull request labels
    • Check pull requests
    • Enforce Groovy migration

@datadog-datadog-us1-prod

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)

Suite Status
Startup 🟡 warning

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.95 s 13.92 s [-0.4%; +0.8%] (no difference)
startup:insecure-bank:tracing:Agent 12.85 s 12.98 s [-1.6%; -0.3%] (maybe better)
startup:petclinic:appsec:Agent 17.38 s 17.15 s [+0.2%; +2.5%] (maybe worse)
startup:petclinic:iast:Agent 17.37 s 17.47 s [-1.4%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 17.44 s 17.39 s [-0.8%; +1.4%] (no difference)
startup:petclinic:sca:Agent 17.50 s 17.28 s [+0.4%; +2.1%] (maybe worse)
startup:petclinic:tracing:Agent 16.57 s 16.24 s [-2.4%; +6.4%] (no difference)

Commit: 504c57b3 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

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

+1, good cleanup

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jul 2, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-02 14:07:56 UTC ℹ️ Start processing command /merge


2026-07-02 14:08:00 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-07-02 15:13:28 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 24074e0 into master Jul 2, 2026
584 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the alexeyk/refactor-v1-baggage-and-span-links branch July 2, 2026 15:13
@github-actions github-actions Bot added this to the 1.64.0 milestone Jul 2, 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: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants