Skip to main content

Class: OpenTelemetryPlugin

Experimental

A plugin that adds OpenTelemetry tracing.

Configures Client, Activity, and Workflow interceptors for trace propagation and injects a span exporter sink for Workflow spans.

Plugins is an experimental feature; APIs may change without notice.

Extends​

Constructors​

Constructor​

new OpenTelemetryPlugin(otelOptions): OpenTelemetryPlugin

Experimental

Parameters​

otelOptions​

OpenTelemetryPluginOptions

Returns​

OpenTelemetryPlugin

Overrides​

SimplePlugin.constructor

Properties​

name​

readonly name: string

Experimental

The name of the plugin

Inherited from​

SimplePlugin.name


otelOptions​

readonly otelOptions: OpenTelemetryPluginOptions

Experimental

Methods​

configureBundler()​

configureBundler(options): BundleOptions

Experimental

Configures bundler options by merging plugin parameters with existing options.

Parameters​

options​

BundleOptions

The existing bundle options

Returns​

BundleOptions

Modified bundle options with plugin configuration applied

Inherited from​

SimplePlugin.configureBundler


configureClient()​

configureClient(options): ClientOptions

Experimental

Configures client options by merging plugin parameters with existing options.

Parameters​

options​

ClientOptions

The existing client options

Returns​

ClientOptions

Modified client options with plugin configuration applied

Inherited from​

SimplePlugin.configureClient


configureConnection()​

configureConnection(options): ConnectionOptions

Experimental

Configures connection options by merging plugin parameters with existing options. Special handling for function-based API keys.

Parameters​

options​

ConnectionOptions

The existing connection options

Returns​

ConnectionOptions

Modified connection options with plugin configuration applied

Inherited from​

SimplePlugin.configureConnection


configureNativeConnection()​

configureNativeConnection(options): NativeConnectionOptions

Experimental

Configures native connection options by merging plugin parameters with existing options.

Parameters​

options​

NativeConnectionOptions

The existing native connection options

Returns​

NativeConnectionOptions

Modified native connection options with plugin configuration applied

Inherited from​

SimplePlugin.configureNativeConnection


configureReplayWorker()​

configureReplayWorker(options): ReplayWorkerOptions

Experimental

Configures replay worker options by merging plugin parameters with existing options.

Parameters​

options​

ReplayWorkerOptions

The existing replay worker options

Returns​

ReplayWorkerOptions

Modified replay worker options with plugin configuration applied

Overrides​

SimplePlugin.configureReplayWorker


configureWorker()​

configureWorker(options): WorkerOptions

Experimental

Configures worker options by merging plugin parameters with existing options. Activities and nexus services are appended, while other options are replaced.

Parameters​

options​

WorkerOptions

The existing worker options

Returns​

WorkerOptions

Modified worker options with plugin configuration applied

Overrides​

SimplePlugin.configureWorker


runWorker()​

runWorker(worker, next): Promise<void>

Experimental

Runs the worker, optionally wrapping execution in a custom context.

Parameters​

worker​

Worker

The worker instance to run

next​

(w) => Promise<void>

Function to continue worker execution

Returns​

Promise<void>

Promise that resolves when worker execution completes

Inherited from​

SimplePlugin.runWorker