Skip to content

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

Open
AlexeyKuznetsov-DD wants to merge 2 commits into
masterfrom
alexeyk/refactor-v1-baggage-and-span-links
Open

v1: serialize span links as structured data and honor baggage tag config.#11810
AlexeyKuznetsov-DD wants to merge 2 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

datadog-datadog-us1-prod Bot commented Jul 2, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 56.45% (-0.53%)

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

@dd-octo-sts

dd-octo-sts Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

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 14.82 s 14.66 s [+0.4%; +1.7%] (maybe worse)
startup:insecure-bank:tracing:Agent 13.71 s 13.69 s [-0.7%; +0.9%] (no difference)
startup:petclinic:appsec:Agent 16.40 s 16.61 s [-5.9%; +3.4%] (no difference)
startup:petclinic:iast:Agent 16.81 s 16.93 s [-1.6%; +0.2%] (no difference)
startup:petclinic:profiling:Agent 16.77 s 16.86 s [-1.7%; +0.5%] (no difference)
startup:petclinic:sca:Agent 16.90 s 16.68 s [+0.3%; +2.2%] (maybe worse)
startup:petclinic:tracing:Agent 16.15 s 16.09 s [-0.5%; +1.3%] (no difference)

Commit: 1e4d4ee6 · 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.

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.

2 participants