Skip to content

🪞 12279 - Fix span link span ID hex padding - #12356

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
community-pr-12279
Sep 1, 2026
Merged

🪞 12279 - Fix span link span ID hex padding#12356
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
community-pr-12279

Conversation

@mcculls

@mcculls mcculls commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This PR mirrors the changes from the original community contribution to enable CI testing with maintainer privileges.

Original PR: #12279
Original Author: @itsamenathan
Original Branch: itsamenathan/dd-trace-java:fix/pad-span-link-span-id-hex

Closes #12279


This is an automated mirror created to run CI checks. See tooling/mirror-community-pull-request.sh for details.

DDSpanLink serialises link ids into the _dd.span_links tag with
DDTraceId.toHexString for the trace id, which pads to 32 characters, but
DDSpanId.toHexString for the span id, which delegates to
Long.toHexString and strips leading zeros.

Span ids are generated as non-zero positive longs, so the leading hex
nibble is zero for one id in eight and those ids serialise to 15
characters or fewer. Consumers that treat the field as fixed-width hex
reject them: the OpenTelemetry Collector's Datadog receiver calls
SpanIDFromHex, which requires exactly 16 characters, and drops the link.
The trace id is unaffected because both DD64bTraceId and DD128bTraceId
pad to 32.

Use DDSpanId.toHexStringPadded, which is the existing padded variant on
the same class, so the emitted id is always 16 characters.
@mcculls
mcculls requested a review from a team as a code owner September 1, 2026 07:32
@mcculls
mcculls requested review from ValentinZakharov and removed request for a team September 1, 2026 07:32
@dd-octo-sts

dd-octo-sts Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot 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.

Datadog Autotest: PASS

More details

The encoder now writes each span-link span ID as a 16-character hexadecimal string. It keeps all leading zeroes.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 2ee853c · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@datadog-datadog-prod-us1

This comment has been minimized.

@mcculls mcculls added type: bug fix Bug fix comp: core Tracer core tag: community Community contribution labels Sep 1, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 1, 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.00 s 13.99 s [-1.0%; +1.1%] (no difference)
startup:insecure-bank:tracing:Agent 12.92 s 13.02 s [-1.4%; -0.0%] (maybe better)
startup:petclinic:appsec:Agent 17.42 s 17.31 s [-0.2%; +1.4%] (no difference)
startup:petclinic:iast:Agent 17.35 s 17.49 s [-1.6%; -0.0%] (maybe better)
startup:petclinic:profiling:Agent 17.38 s 17.30 s [-0.6%; +1.6%] (no difference)
startup:petclinic:sca:Agent 17.46 s 16.49 s [+1.5%; +10.3%] (significantly worse)
startup:petclinic:tracing:Agent 16.60 s 16.72 s [-1.8%; +0.3%] (no difference)

Commit: 4f24ed86 · 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 enabled auto-merge September 1, 2026 13:41
@mcculls
mcculls added this pull request to the merge queue Sep 1, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

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

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-01 14:20:48 UTC ℹ️ Start processing command /merge


2026-09-01 14:20:53 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-01 14:49:02 UTCMergeQueue: The build pipeline contains failing jobs for this merge request

Build pipeline has failing jobs for 5118a35:

⚠️ Do NOT retry failed jobs directly (why?).

What to do next?

  • Investigate the failures and when ready, re-add your pull request to the queue!
  • If your PR checks are green, try to rebase/merge. It might be because the CI run is a bit old.
  • Any question, go check the FAQ.
Details

Since those jobs are not marked as being allowed to fail, the pipeline will most likely fail.
Therefore, and to allow other builds to be processed, this merge request has been rejected and the pipeline got canceled.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 1, 2026
@mcculls
mcculls added this pull request to the merge queue Sep 1, 2026
@dd-octo-sts

dd-octo-sts Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

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

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-09-01 15:00:06 UTC ℹ️ Start processing command /merge


2026-09-01 15:00:12 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-09-01 15:56:47 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 1, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit fb408c3 into master Sep 1, 2026
602 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the community-pr-12279 branch September 1, 2026 15:56
@github-actions github-actions Bot added this to the 1.66.0 milestone Sep 1, 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: community Community contribution type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants