Skip to main content

opentelemetry

npm i @temporalio/interceptors-opentelemetry

Interceptors that add OpenTelemetry tracing.

Documentation

Enumerations​

Classes​

Interfaces​

Type Aliases​

SerializableSpanContext​

SerializableSpanContext = Omit<otel.SpanContext, "traceState"> & object

Serializable version of SpanContext where traceState is converted to a string.

Type Declaration​

traceState?​

optional traceState?: string

Variables​

SPAN_DELIMITER​

const SPAN_DELIMITER: ":" = ":"

Functions​

makeWorkflowExporter()​

Call Signature​

makeWorkflowExporter(spanExporter, resource): InjectedSink<OpenTelemetryWorkflowExporter>

Takes an opentelemetry SpanExporter and turns it into an injected Workflow span exporter sink

Parameters​
spanExporter​

SpanExporter

resource​

Resource

Returns​

InjectedSink<OpenTelemetryWorkflowExporter>

Deprecated​

Do not directly pass a SpanExporter. Pass a SpanProcessor instead to ensure proper handling of async attributes.

Call Signature​

makeWorkflowExporter(spanProcessor, resource): InjectedSink<OpenTelemetryWorkflowExporter>

Takes an opentelemetry SpanProcessor and turns it into an injected Workflow span exporter sink.

For backward compatibility, passing a SpanExporter directly is still supported.

Parameters​
spanProcessor​

SpanProcessor

resource​

Resource

Returns​

InjectedSink<OpenTelemetryWorkflowExporter>

References​

OpenTelemetryWorkflowClientCallsInterceptor​

Renames and re-exports OpenTelemetryWorkflowClientInterceptor