class OpenTelemetryPlugin(SimplePlugin): (source)
Constructor: OpenTelemetryPlugin(add_temporal_spans)
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 |
See base class. |
| Method | configure |
See base class. |
| Method | configure |
See base class. |
| Async Method | connect |
See base class. |
| Method | name |
See base class. |
| Async Method | run |
See base class. |
| Async Method | run |
See base class. |
| Instance Variable | activities |
Undocumented |
| Instance Variable | data |
Undocumented |
| Instance Variable | interceptors |
Undocumented |
| Instance Variable | nexus |
Undocumented |
| Instance Variable | run |
Undocumented |
| Instance Variable | workflow |
Undocumented |
| Instance Variable | workflow |
Undocumented |
| Instance Variable | workflows |
Undocumented |
| Instance Variable | _name |
Undocumented |