Introduce SpanPrototype: baked-once constant span-tag descriptor#11894
Draft
dougqh wants to merge 1 commit into
Draft
Introduce SpanPrototype: baked-once constant span-tag descriptor#11894dougqh wants to merge 1 commit into
dougqh wants to merge 1 commit into
Conversation
The builder API (extends_/init*) plus its per-mechanism microbenchmark and a pure-API test, split out from the combined span-prototype work so the abstraction lands independently of the decorator demo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 9, 2026
Contributor
|
🎯 Code Coverage (details) 🔗 Commit SHA: 3af8e13 | Docs | Datadog PR Page | Give us feedback! |
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 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
Introduces
SpanPrototype— a baked-once, immutable descriptor of a span's constant identity + tags (builder API:extends_/init*), plus its per-mechanism JMH benchmark and a pure-API unit test.Why
The constant tags a span carries are applied today via per-
afterStartsetTagcalls.SpanPrototypebakes those constants once so a span can adopt them with a cheap copy instead. This PR lands the abstraction only — nothing constructs a span from a prototype yet.Split of #11828
Part 1 of 2. This introduces the API in isolation; the decorator demo that bakes prototypes is the stacked follow-up, #11895. Construction (
buildSpan(SpanPrototype)) is #11834 (dougqh/span-prototype-construction).Notes
SpanPrototype.NONEis intentionally kept: it's the no-prototype sentinel consumed by the construction PR (Thread SpanPrototype through span construction (parked until dense store) #11834 —CoreTracerdefault field +!= NONEguard), not dead code.🤖 Generated with Claude Code