Repository navigation
Conversation
The extraction cache formatted x-datadog-parent-id as 16 hex characters on every extraction, though only a W3C span id override reads it. Keep the parsed id and format it on demand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DD128bTraceId.fromHex kept a substring of the traceparent as the id's cached hex form, one per extraction. Build the id from its high and low order bits, which both parse paths now read the same way, so its hex form is formatted only if read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Extraction no longer formats hex strings for ids that are usually never read as hex. One commit each:
x-datadog-parent-idinto a 16-character hex string on every extraction. Only a W3C span id override reads it, as_dd.parent_id.longand formats it on demand. It still parses as each header arrives, so invalid values are still skipped when the header repeats.DD128bTraceId.fromHexkept a 32-charactersubstringof the traceparent as the id's cached hex form, once per extraction.DD128bTraceId.from(high, low), which formats its hex lazily and caches it.Motivation
Ids unique to a trace or span shouldn't be formatted or cached unless they're read. In the Kafka consumer macro benchmark (#13051, JFR allocation profile, 10M records),
ExtractionCache.cacheDatadogSpanIdalone accounts for about 0.2 GB ofStringallocation.No JMH numbers yet. The propagation tests and the compound-extraction golden corpus (which covers
_dd.parent_id) pass unchanged.Additional Notes
Stacked on #13043.
🤖 Generated with Claude Code