Skip to main content

Class: OpenTelemetryNexusInboundInterceptor

opentelemetry.OpenTelemetryNexusInboundInterceptor

Intercepts inbound Nexus Operation calls on the worker.

Wraps startOperation and cancelOperation in opentelemetry Spans, linking to a parent Span context if one is provided in the Nexus request headers.

Implements​

Constructors​

constructor​

• new OpenTelemetryNexusInboundInterceptor(ctx, options?): OpenTelemetryNexusInboundInterceptor

Parameters​

NameType
ctxOperationContext
options?InterceptorOptions

Returns​

OpenTelemetryNexusInboundInterceptor

Methods​

cancelOperation​

▸ cancelOperation(input, next): Promise<void>

Parameters​

NameType
inputNexusCancelOperationInput
nextOmitLastParam<(input: NexusCancelOperationInput, next: OmitLastParam<(input: NexusCancelOperationInput, next: OmitLastParam<...>) => Promise<void>>) => Promise<void>>

Returns​

Promise<void>

Implementation of​

NexusInboundCallsInterceptor.cancelOperation


startOperation​

▸ startOperation(input, next): Promise<NexusStartOperationOutput>

Parameters​

NameType
inputNexusStartOperationInput
nextOmitLastParam<(input: NexusStartOperationInput, next: OmitLastParam<(input: NexusStartOperationInput, next: OmitLastParam<...>) => Promise<NexusStartOperationOutput>>) => Promise<NexusStartOperationOutput>>

Returns​

Promise<NexusStartOperationOutput>

Implementation of​

NexusInboundCallsInterceptor.startOperation