class documentation

OpenTelemetry plugin for Temporal SDK.

Warning

This class is experimental and may change in future versions. Use with caution in production environments.

This plugin integrates OpenTelemetry tracing with the Temporal SDK, providing automatic span creation for workflows, activities, and other Temporal operations. It uses the new OpenTelemetryInterceptor implementation.

Unlike the prior TracingInterceptor, this allows for accurate duration spans and parenting inside a workflow with temporalio.contrib.opentelemetry.workflow.tracer()

Your tracer provider should be created with create_tracer_provider for it to be used within a Temporal worker.

Method __init__ Initialize the OpenTelemetry plugin.

Inherited from SimplePlugin:

Method configure_client See base class.
Method configure_replayer See base class.
Method configure_worker See base class.
Async Method connect_service_client See base class.
Method name See base class.
Async Method run_replayer See base class.
Async Method run_worker See base class.
Instance Variable activities Undocumented
Instance Variable data_converter Undocumented
Instance Variable interceptors Undocumented
Instance Variable nexus_service_handlers Undocumented
Instance Variable run_context Undocumented
Instance Variable workflow_failure_exception_types Undocumented
Instance Variable workflow_runner Undocumented
Instance Variable workflows Undocumented
Instance Variable _name Undocumented
def __init__(self, *, add_temporal_spans: bool = False): (source) ΒΆ

Initialize the OpenTelemetry plugin.

Parameters
add_temporal_spans:boolWhether to add additional Temporal-specific spans for operations like StartWorkflow, RunWorkflow, etc.