Skip to main content

Class: OpenTelemetryActivityOutboundInterceptor

opentelemetryV2.OpenTelemetryActivityOutboundInterceptor

Intercepts calls to emit logs and metrics from an Activity.

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

This interceptor is experimental and APIs may change without notice.

Implements​

Constructors​

constructor​

• new OpenTelemetryActivityOutboundInterceptor(ctx): OpenTelemetryActivityOutboundInterceptor

Parameters​

NameType
ctxContext

Returns​

OpenTelemetryActivityOutboundInterceptor

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​

ActivityOutboundCallsInterceptor.getLogAttributes


getMetricTags​

▸ getMetricTags(input, next): MetricTags

Parameters​

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

Returns​

MetricTags

Implementation of​

ActivityOutboundCallsInterceptor.getMetricTags