Repository navigation
Conversation
Contributor
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. |
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
dougqh
force-pushed
the
dougqh/header-schema
branch
from
November 21, 2026 19:14
19ec675 to
d5708a4
Compare
dougqh
force-pushed
the
dougqh/transient-values
branch
from
November 21, 2026 19:14
f476891 to
42b4292
Compare
The propagation contract for parsing header values in place, with no producer yet, so nothing changes at runtime: - HeaderSchema.isParseOnly(): the Datadog trace id, parent id and sampling priority headers, whose readers only parse their values. - TransientValueConsumer: how a carrier hands such a value as a view valid only during the call. The composite propagator's cache implements it, keeps the view for the extraction (allocating its view slots only when one arrives), and copies it once if something reads it as a String. - IndexedCarrier.valueView(i), and KeyClassifier.acceptTransient(header, key, value), whose default copies the view and calls accept. Extraction hands views to acceptTransient and Strings to accept. ExtractorKeysForkedTest's carrier now hands parse-only values as views, so its per-style and compound equivalence checks cover this path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cache allocated a separate CharSequence[] the first time a view arrived, which on Kafka is every extraction (about 48 bytes). Values are now Objects in the one pairs array, a String or a view until read as a String. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dougqh
force-pushed
the
dougqh/header-schema
branch
from
November 21, 2026 19:39
d5708a4 to
93a92d8
Compare
dougqh
force-pushed
the
dougqh/transient-values
branch
from
November 21, 2026 19:39
42b4292 to
14e69c0
Compare
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
Adds the propagation contract for parsing header values in place: a carrier may hand a parse-only header's value as a transient view, valid only during the extraction, instead of decoding it into a
String. No carrier produces views yet, so nothing changes at runtime.Stacked on #13613. Part 3 of the value-views series (#13616, #13617).
Motivation
The header value
Strings are the largest tracer allocation site in a Kafka consumer profile. Three of them (x-datadog-trace-id,x-datadog-parent-id,x-datadog-sampling-priority) are parsed into numbers and never kept, so a byte carrier could hand them as views (#13617) and the Datadog extractor parse them in place (#13616's parsers). This PR is the contract between the two, kept separate so it can be reviewed on its own.Additional Notes
HeaderSchema.isParseOnly(): true for those three headers. A propagator that starts keeping such a value must copy it, or the flag must change; the Javadoc says so.TransientValueConsumer(components/context):acceptTransient(header, key, CharSequence value), how a carrier hands a parse-only value as a view valid only during the call. A carrier may use it only if the visitor implements it.Stringvalues (anObject[], so a view costs no extra allocation), and copies it once if anything reads it as aString(value(i)andforEachKeyValuealways returnStrings).IndexedCarrier.valueView(i): the value, possibly a view; defaults tovalue(i).KeyClassifier.acceptTransient(header, key, value)(internal-api): the default copies the view and callsaccept(header, key, value), so every existing classifier seesStrings as before. Extraction (HttpCodec.acceptIndexed, used byExtractionCacheand the single-extractor path) hands views toacceptTransientandStrings toaccept.@NoEscape(seeAsciiSequence, Add AsciiSequence, a CharSequence view of ASCII bytes #13617). Nothing in this PR keeps one past the extraction; the classifiers that will parse them (part 4) parse or copy within the call.CarrierCacheTest(views kept as given, copied once and the copy kept, constants from the caller, growth,Strings fromforEachKeyValue, null values);HeaderSchemaTest(exactly those three are parse-only);ExtractorKeysForkedTest's carrier now hands parse-only values as non-Stringviews, so its per-style and compound equivalence checks cover the transient path (through the default copy, until part 4).🤖 Generated with Claude Code