TraceBehavior
Defined in: trace.behavior.ts:168
Pipeline behavior that wraps a handler in an OpenTelemetry span.
With no OpenTelemetry SDK registered, trace.getTracer() returns a no-op
tracer and spans are discarded; enabled: false skips tracing for a handler.
Each span includes stable pipeline semantic attributes such as request kind,
request name, handler name, correlation ID and start time. The final outcome
(success/failure) and error type are added after execution.
Examples
Section titled “Examples”Global tracing
Per-handler enrichment
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TraceBehavior():
TraceBehavior
Returns
Section titled “Returns”TraceBehavior
Methods
Section titled “Methods”handle()
Section titled “handle()”handle(
context,next):Promise<unknown>
Defined in: trace.behavior.ts:169
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”Promise<unknown>