Class: OpenTelemetryOutboundInterceptor
opentelemetry.OpenTelemetryOutboundInterceptor
Intercepts outbound calls to schedule an Activity
Wraps the operation in an opentelemetry Span and passes it to the Activity via headers.
Implements
Constructors
constructor
• new OpenTelemetryOutboundInterceptor(): OpenTelemetryOutboundInterceptor
Returns
OpenTelemetryOutboundInterceptor
Methods
continueAsNew
▸ continueAsNew(input
, next
): Promise
<never
>
Called when Workflow calls continueAsNew
Parameters
Name | Type |
---|---|
input | ContinueAsNewInput |
next | OmitLastParam <(input : ContinueAsNewInput , next : OmitLastParam<(input: ContinueAsNewInput, next: OmitLastParam<...>) => Promise<never>>) => Promise <never >> |
Returns
Promise
<never
>
Implementation of
WorkflowOutboundCallsInterceptor.continueAsNew
getLogAttributes
▸ getLogAttributes(input
, next
): Record
<string
, unknown
>
Called on each invocation of the workflow.log
methods.
The attributes returned in this call are attached to every log message.
Parameters
Name | Type |
---|---|
input | GetLogAttributesInput |
next | OmitLastParam <(input : GetLogAttributesInput , next : OmitLastParam<(input: GetLogAttributesInput, next: OmitLastParam<...>) => Record<string, unknown>>) => Record <string , unknown >> |
Returns
Record
<string
, unknown
>
Implementation of
WorkflowOutboundCallsInterceptor.getLogAttributes
scheduleActivity
▸ scheduleActivity(input
, next
): Promise
<unknown
>
Called when Workflow schedules an Activity
Parameters
Name | Type |
---|---|
input | ActivityInput |
next | OmitLastParam <(input : ActivityInput , next : OmitLastParam<(input: ActivityInput, next: OmitLastParam<...>) => Promise<unknown>>) => Promise <unknown >> |
Returns
Promise
<unknown
>
result of the activity execution
Implementation of
WorkflowOutboundCallsInterceptor.scheduleActivity
signalWorkflow
▸ signalWorkflow(input
, next
): Promise
<void
>
Called when Workflow signals a child or external Workflow
Parameters
Name | Type |
---|---|
input | SignalWorkflowInput |
next | OmitLastParam <(input : SignalWorkflowInput , next : OmitLastParam<(input: SignalWorkflowInput, next: OmitLastParam<...>) => Promise<void>>) => Promise <void >> |
Returns
Promise
<void
>
Implementation of
WorkflowOutboundCallsInterceptor.signalWorkflow
startChildWorkflowExecution
▸ startChildWorkflowExecution(input
, next
): Promise
<[Promise
<string
>, Promise
<unknown
>]>
Called when Workflow starts a child workflow execution, the interceptor function returns 2 promises:
- The first resolves with the
runId
when the child workflow has started or rejects if failed to start. - The second resolves with the workflow result when the child workflow completes or rejects on failure.
Parameters
Name | Type |
---|---|
input | StartChildWorkflowExecutionInput |
next | OmitLastParam <(input : StartChildWorkflowExecutionInput , next : OmitLastParam<(input: StartChildWorkflowExecutionInput, next: OmitLastParam<...>) => Promise<[Promise<string>, Promise<unknown>]>>) => Promise <[Promise <string >, Promise <unknown >]>> |
Returns
Promise
<[Promise
<string
>, Promise
<unknown
>]>
Implementation of
WorkflowOutboundCallsInterceptor.startChildWorkflowExecution