Skip to content

Demonstrate SpanPrototype: bake constant span tags in decorators (phase 1b) - #11895

Closed
dougqh wants to merge 2 commits into
dougqh/span-prototype-apifrom
dougqh/span-prototype-demo
Closed

dougqh wants to merge 2 commits into
dougqh/span-prototype-apifrom
dougqh/span-prototype-demo

Conversation

@dougqh

@dougqh dougqh commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What

Demonstrates SpanPrototype (#11894) by wiring BaseDecorator / ClientDecorator / ServerDecorator to bake a per-decorator prototype — the identity + constant tags each decorator contributes — the concrete usage behind the deck's slide examples.

Why

Shows the API in action: a decorator bakes its constant tags once (prototype() / prototypeBuilder()), the shape a span would adopt by copy. Also carries the decorator-coupled tests (the pure-API test stays in #11894).

Split of #11828

Part 2 of 2, stacked on #11894. Construction (buildSpan(SpanPrototype)) is #11834.

🤖 Generated with Claude Code

@datadog-prod-us1-3

This comment has been minimized.

@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 13.96 s 13.95 s [-0.7%; +0.9%] (no difference)
startup:insecure-bank:tracing:Agent 12.91 s 12.96 s [-1.1%; +0.4%] (no difference)
startup:petclinic:appsec:Agent 16.92 s 16.95 s [-1.1%; +0.7%] (no difference)
startup:petclinic:iast:Agent 17.08 s 17.07 s [-0.7%; +0.9%] (no difference)
startup:petclinic:profiling:Agent 16.66 s 16.91 s [-2.7%; -0.4%] (maybe better)
startup:petclinic:sca:Agent 17.01 s 16.91 s [-0.4%; +1.5%] (no difference)
startup:petclinic:tracing:Agent 15.72 s 16.13 s [-6.8%; +1.8%] (no difference)

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

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>
@dougqh
dougqh force-pushed the dougqh/span-prototype-api branch from 3af8e13 to 41666f5 Compare July 20, 2026 20:04
Wires BaseDecorator/ClientDecorator/ServerDecorator to bake a per-decorator
SpanPrototype (identity + constant tags) — the concrete usage behind the
slide examples. Decorator-coupled tests live here; the pure-API test moved
to the introducing PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dougqh
dougqh force-pushed the dougqh/span-prototype-demo branch from 60e1300 to 327afce Compare July 20, 2026 20:08
@dougqh dougqh changed the title Demonstrate SpanPrototype: bake constant span tags in decorators Demonstrate SpanPrototype: bake constant span tags in decorators (phase 1b) Jul 20, 2026
@dougqh
dougqh force-pushed the dougqh/span-prototype-api branch 4 times, most recently from e2a5162 to b8aa652 Compare July 22, 2026 12:21
@dougqh

dougqh commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Closing. This PR served its purpose as an end-to-end design validation of SpanPrototype (proving the constant-tag baking + construction path works from a decorator). It's a pure-additive demonstration (it adds prototype scaffolding alongside the existing afterStart stamping rather than replacing it), and its base carries an older revision of the SpanPrototype type/benchmark that #11894 has since reworked (folded construction path, uniform init* builder, integration-name carry, isEmptyValue).

Real usage will land as a fresh, tightly-scoped PR on top of #11894 — migrating a specific decorator's constant tags to a baked SpanPrototype (deleting the per-span setTag stamping) so the allocation win is exercised on a real path.

— Claude (via Claude Code)

@dougqh dougqh closed this Jul 22, 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: 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