Skip to main content

Interface: ActivityOutboundCallsInterceptor

worker.ActivityOutboundCallsInterceptor

Implement any of these methods to intercept Activity outbound calls

Implemented by

Properties

getLogAttributes

Optional getLogAttributes: (input: GetLogAttributesInput, next: OmitLastParam<(input: GetLogAttributesInput, next: OmitLastParam<...>) => Record<string, unknown>>) => Record<string, unknown>

Called on each invocation of the activity.log methods.

The attributes returned in this call are attached to every log message.

Type declaration

▸ (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
NameType
inputGetLogAttributesInput
nextOmitLastParam<(input: GetLogAttributesInput, next: OmitLastParam<...>) => Record<string, unknown>>
Returns

Record<string, unknown>


getMetricTags

Optional getMetricTags: (input: MetricTags, next: OmitLastParam<(input: MetricTags, next: OmitLastParam<...>) => MetricTags>) => MetricTags

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.

Type declaration

▸ (input, next): MetricTags

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
NameType
inputMetricTags
nextOmitLastParam<(input: MetricTags, next: OmitLastParam<...>) => MetricTags>
Returns

MetricTags