Class: OpenTelemetryActivityOutboundInterceptor
Experimental
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
Experimental
Parameters
ctx
Returns
OpenTelemetryActivityOutboundInterceptor
Methods
getLogAttributes()
getLogAttributes(
input,next):Record<string,unknown>
Experimental
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
Experimental
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>