Class: OpenTelemetryActivityOutboundInterceptor
Intercepts calls to emit logs and metrics from an Activity.
Attach OpenTelemetry context tracing attributes to emitted log messages, if appropriate.
Implements
Constructors
Constructor
new OpenTelemetryActivityOutboundInterceptor(
ctx):OpenTelemetryActivityOutboundInterceptor
Parameters
ctx
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
input
next
OmitLastParam<(input, next) => Record<string, unknown>>
Returns
Record<string, unknown>
Implementation of
ActivityOutboundCallsInterceptor.getLogAttributes
getMetricTags()
getMetricTags(
input,next):GetMetricTagsInput
Called once every time a metric is emitted from an Activity metric (ie. a metric created from activity.metricMeter).
Tags returned by this hook are prepended to tags defined at the metric level and tags defined on the emitter function itself.
Parameters
input
next
OmitLastParam<(input, next) => MetricTags>