Skip to content

telemetry: a declaration's audience picks its pipeline at compile time - #8770

Merged
theomonnom merged 1 commit into
v2.0from
theo/telemetry-audience
Nov 25, 2026
Merged

theomonnom merged 1 commit into
v2.0from
theo/telemetry-audience

Conversation

@theomonnom

Copy link
Copy Markdown
Member

No description provided.

…y its own

MetricDecl, SpanDecl and EventDecl carry a sealed Audience: Observability (the
customer's) by default, ProductStats with `audience = ProductStats`. Customer
entry points (scoped start/measure/reserve, Cx::under, ManualSpan opens,
Trace::measure, process instruments, Instrument::of) take only Observability;
productstats::record and count take only ProductStats. A span's parent and
events must share its audience. lk-agents-codegen checks that every
`productstats` declaration is ProductStats and none elsewhere is.
compile_fail doctests prove both cross-audience recordings are rejected.
@theomonnom
theomonnom requested a review from a team as a code owner November 25, 2026 00:11
@theomonnom
theomonnom merged commit f86e9c6 into v2.0 Nov 25, 2026
@theomonnom
theomonnom deleted the theo/telemetry-audience branch November 25, 2026 00:11

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 2 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant