Libraries
    Preparing search index...

    Interface TracingMiddlewareOptions

    Configuration for tracingMiddleware.

    interface TracingMiddlewareOptions {
        enrichSpan?: (span: Span, ctx: any) => void;
        excludePaths?: (string | { path: string })[];
        recordQuery?: boolean;
        responseTraceHeader?: string | false;
        tracerName?: string;
        tracerVersion?: string;
    }
    Index

    Properties

    enrichSpan?: (span: Span, ctx: any) => void

    Hook for adding custom attributes to the server span just before the inner pipeline runs. Errors thrown here are swallowed.

    excludePaths?: (string | { path: string })[]

    Paths to exclude from tracing entirely (no span created).

    Accepts plain strings or objects with a path property (e.g. an EndpointBuilder). Useful for /health and other high-frequency, low-value endpoints.

    recordQuery?: boolean

    Whether to record the URL query string as url.query.

    Disabled by default because query strings frequently contain PII (search terms, tokens). Enable explicitly only when you have verified your URLs are safe to record.

    false
    
    responseTraceHeader?: string | false

    Name of the response header that carries the W3C trace ID for the current request span.

    Expose this so API consumers can include it in bug reports and you can look up the exact trace in SigNoz / Jaeger / etc.

    Set to false to disable the header entirely.

    'X-Trace-Id'
    
    tracerName?: string

    Tracer name used when resolving the OTel tracer.

    '@cleverbrush/otel'
    
    tracerVersion?: string

    Tracer version.