Skip to main content

Class: OpenTelemetryActivityOutboundInterceptor

opentelemetry.OpenTelemetryActivityOutboundInterceptor

Intercepts calls to emit logs from an Activity.

Attach OpenTelemetry context tracing attributes to emitted log messages, if appropriate.

Implements

Constructors

constructor

new OpenTelemetryActivityOutboundInterceptor(ctx): OpenTelemetryActivityOutboundInterceptor

Parameters

NameType
ctxContext

Returns

OpenTelemetryActivityOutboundInterceptor

Methods

getLogAttributes

getLogAttributes(input, next): Record<string, unknown>

Called on each invocation of the activity.log methods.

The attributes returned in this call are attached to every log message.

Parameters

NameType
inputGetLogAttributesInput
nextOmitLastParam<(input: GetLogAttributesInput, next: OmitLastParam<(input: GetLogAttributesInput, next: OmitLastParam<...>) => Record<string, unknown>>) => Record<string, unknown>>

Returns

Record<string, unknown>

Implementation of

ActivityOutboundCallsInterceptor.getLogAttributes