Skip to main content

Class: ActivityInboundLogInterceptor

worker.ActivityInboundLogInterceptor

This interceptor was previously used to log Activity execution starts and their completions. It is now deprecated and behaves as a noop in most cases. It is only kept arround to avoid breaking code out there that was previously refering to it.

Deprecated

ActivityInboundLogInterceptor is deprecated. Activity lifecycle events are now automatically logged by the SDK. To customize activity log attributes, register a custom ActivityOutboundCallsInterceptor that intercepts the getLogAttributes() method. To customize where log messages are sent, set the Runtime.logger property.

Implements

Constructors

constructor

new ActivityInboundLogInterceptor(ctx, logger?): ActivityInboundLogInterceptor

Parameters

NameType
ctxContext
logger?Logger

Returns

ActivityInboundLogInterceptor

Methods

execute

execute(input, next): Promise<unknown>

Called when Activity function is executed

Parameters

NameType
inputActivityExecuteInput
nextOmitLastParam<(input: ActivityExecuteInput, next: OmitLastParam<(input: ActivityExecuteInput, next: OmitLastParam<...>) => Promise<unknown>>) => Promise<unknown>>

Returns

Promise<unknown>

result of Activity function

Implementation of

ActivityInboundCallsInterceptor.execute