Skip to main content

Class: OpenTelemetryActivityInboundInterceptor

opentelemetry.OpenTelemetryActivityInboundInterceptor

Intercepts calls to start an Activity.

Wraps the operation in an opentelemetry Span and links it to a parent Span context if one is provided in the Activity input headers.

Implements

Constructors

constructor

new OpenTelemetryActivityInboundInterceptor(ctx, options?): OpenTelemetryActivityInboundInterceptor

Parameters

NameType
ctxContext
options?InterceptorOptions

Returns

OpenTelemetryActivityInboundInterceptor

Methods

execute

execute(input, next): Promise<unknown>

Called when Activity function is executed

Parameters

NameType
inputActivityExecuteInput
nextOmitLastParam<(input: ActivityExecuteInput, next: OmitLastParam<(input: ActivityExecuteInput, next: OmitLastParam<...>) => Promise<unknown>>) => Promise<unknown>>

Returns

Promise<unknown>

result of Activity function

Implementation of

ActivityInboundCallsInterceptor.execute