Skip to content

Fix JSON span event encoding in v1 payloads. - #12107

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
alexeyk/fix-v1-span-events-json-encoding
Jul 31, 2026
Merged

Fix JSON span event encoding in v1 payloads.#12107
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
alexeyk/fix-v1-span-events-json-encoding

Conversation

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor

What Does This Do

Parses the existing events JSON tag in TraceMapperV1 and encodes span events into the native v1 MessagePack span_events field.

Motivation

OpenTelemetry span events are stored as JSON, while TraceMapperV1 only handled pre-parsed List values. This caused v1 payloads to contain an empty span_events array.

Additional Notes

This is a focused compatibility fix.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Jul 29, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added type: bug fix Bug fix comp: core Tracer core tag: no release notes Changes to exclude from release notes labels Jul 29, 2026
@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 6680c2bb18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Jul 29, 2026

Copy link
Copy Markdown

🎯 Code Coverage (details)
Patch Coverage: 84.62%
Overall Coverage: 58.01% (+0.23%)

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

@dd-octo-sts

dd-octo-sts Bot commented Jul 29, 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 13.98 s 14.00 s [-0.9%; +0.5%] (no difference)
startup:insecure-bank:tracing:Agent 12.91 s 13.03 s [-1.6%; -0.2%] (maybe better)
startup:petclinic:appsec:Agent 16.97 s 16.87 s [-0.2%; +1.5%] (no difference)
startup:petclinic:iast:Agent 16.95 s 17.01 s [-1.3%; +0.6%] (no difference)
startup:petclinic:profiling:Agent 16.30 s 16.99 s [-8.3%; +0.2%] (no difference)
startup:petclinic:sca:Agent 16.72 s 16.59 s [-0.0%; +1.6%] (no difference)
startup:petclinic:tracing:Agent 16.21 s 16.22 s [-1.1%; +1.0%] (no difference)

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

@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD marked this pull request as ready for review July 30, 2026 00:29
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested a review from a team as a code owner July 30, 2026 00:29

@datadog-prod-us1-6 datadog-prod-us1-6 Bot left a comment

Copy link
Copy Markdown

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 JSON span-event path preserves the existing v1 filtering and encoding behavior while converting the OpenTelemetry tag into native span_events; malformed or non-array input falls back to an empty array without leaking the tag into attributes. Local Gradle execution was blocked by the unavailable Java 25 toolchain.

Was this helpful? React 👍 or 👎

Open Bits AI session

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6680c2bb18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# Conflicts:
#	dd-trace-core/src/test/java/datadog/trace/core/DDSpanSerializationTest.java
@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

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

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-30 23:20:40 UTC ℹ️ Start processing command /merge


2026-07-30 23:20:45 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-07-31 00:54:17 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 90e912b into master Jul 31, 2026
780 of 782 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the alexeyk/fix-v1-span-events-json-encoding branch July 31, 2026 00:54
@github-actions github-actions Bot added this to the 1.65.0 milestone Jul 31, 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: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants