Skip to content

Introduce SpanPrototype: baked-once constant span-tag descriptor#11894

Draft
dougqh wants to merge 1 commit into
masterfrom
dougqh/span-prototype-api
Draft

Introduce SpanPrototype: baked-once constant span-tag descriptor#11894
dougqh wants to merge 1 commit into
masterfrom
dougqh/span-prototype-api

Conversation

@dougqh

@dougqh dougqh commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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-afterStart setTag calls. SpanPrototype bakes 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

🤖 Generated with Claude Code

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

datadog-datadog-prod-us1-2 Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 60.47%
Overall Coverage: 54.96% (-1.97%)

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

@dd-octo-sts

dd-octo-sts Bot commented Jul 9, 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.73 s 14.63 s [-0.1%; +1.5%] (no difference)
startup:insecure-bank:tracing:Agent 13.61 s 13.67 s [-1.2%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 17.52 s 17.26 s [+0.5%; +2.5%] (maybe worse)
startup:petclinic:iast:Agent 17.50 s 17.58 s [-1.3%; +0.4%] (no difference)
startup:petclinic:profiling:Agent 17.47 s 17.51 s [-1.2%; +0.7%] (no difference)
startup:petclinic:sca:Agent 17.58 s 17.53 s [-0.6%; +1.2%] (no difference)
startup:petclinic:tracing:Agent 16.56 s 16.63 s [-1.5%; +0.6%] (no difference)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant