Description

Interceptor that adds OpenTelemetry span attributes for incoming HTTP requests. Captures URL, body, headers, method, params, query, and response data. Supports exclusion of certain URLs via config, as well as granular exclusion of concrete span aspects — globally (TracingInterceptor.excludedAttributes) or per-URL (TracingInterceptor.excludedByURL, string entries match by substring inclusion, RegExp entries by test).

Example

{
"TracingInterceptor": {
"excluded": ["/health"],
"excludedAttributes": ["response.data"],
"excludedByURL": [{ "url": "/files", "attributes": ["body", "response"] }]
}
}

Implements

  • NestInterceptor

Constructors

Properties

config: IConfig
aspectAliases: Record<string, string> = ...

Description

Aliases accepted in exclusion lists for aspect matching

aspectKeys: Record<string, string> = ...

Description

Span attribute key for a canonical aspect name

Methods