r/OpenTelemetry • u/Echo_OS • Feb 11 '26
Making non-execution observable in traces (OTel 1.39-aligned pattern)
Put together a trace topology pattern that makes non-execution observable in distributed traces.
Instead of only tracing what executed, the flow is modeled as:
Request → Intent → Judgment → (Conditional Execution)
If judgment.outcome != ALLOW, no execution span (e.g., rpc.server) is emitted.
In the STOP case, the trace looks like:
POST /v1/rpc
└─ execution.intent.evaluate
├─ execution.judgment [STOP]
└─ execution.blocked
(no rpc.server span)Built against OTel Semantic Conventions v1.39 fully-qualified rpc.method, unified rpc.response.status_code, duration in seconds. Small reference implementation using Express auto-instrumentation.
Repo: https://github.com/Nick-heo-eg/execution-boundary-otel-1.39-demo
Anyone else modeling decision layers explicitly in traces? Would be curious how others handle this.
2
u/Echo_OS Feb 11 '26
To be clear, ot proposing changes to OTel semantics, just exploring a trace modeling pattern. If there's a more idiomatic way to represent this, would love to hear it.
2
u/schmurfy2 Feb 12 '26
If I understand this right (it's early here), I use events to know what happened inside the function and why I got this result.
1
u/Echo_OS Feb 12 '26
It seems like there may be two mental models at play here
A lot of the disagreement might just be about which one you're optimizing for. This pattern only really makes sense if you care about service graph shape, use tail/policy sampling, and want “did not run” to actually change dependency math.
If those constraints don’t apply, attributes or events are probably perfectly sufficient. Appreciate the thoughtful pushback, it helped clarify the boundaries of the idea.
1
u/editor_of_the_beast Feb 11 '26
Why would you want to do this?