Skip to main content

Class: OpenTelemetryNexusOutboundInterceptor

opentelemetry.OpenTelemetryNexusOutboundInterceptor

Intercepts outbound calls from a Nexus Operation handler.

Attaches OpenTelemetry context tracing attributes to emitted log messages and metrics.

Implements

Constructors

constructor

new OpenTelemetryNexusOutboundInterceptor(ctx): OpenTelemetryNexusOutboundInterceptor

Parameters

NameType
ctxOperationContext

Returns

OpenTelemetryNexusOutboundInterceptor

Methods

getLogAttributes

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

Parameters

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

Returns

Record<string, unknown>

Implementation of

NexusOutboundCallsInterceptor.getLogAttributes


getMetricTags

getMetricTags(input, next): MetricTags

Parameters

NameType
inputMetricTags
nextOmitLastParam<(input: MetricTags, next: OmitLastParam<(input: MetricTags, next: OmitLastParam<...>) => MetricTags>) => MetricTags>

Returns

MetricTags

Implementation of

NexusOutboundCallsInterceptor.getMetricTags