package documentation
OpenTelemetry integration for Temporal workers running on Google Cloud Run.
This package is designed for container-based Cloud Run workers, especially worker pools, and exports telemetry to an OpenTelemetry collector sidecar by default.
Warning
This package is experimental and may change in future versions. Use with caution in production environments.
| Module | _opentelemetry |
OpenTelemetry plugin with Google Cloud Run defaults. |
From __init__.py:
| Class | |
OpenTelemetry plugin for Temporal workers running on Google Cloud Run. |
| Function | build |
Build Temporal Core telemetry with Google Cloud Run defaults. |
| Constant | CLOUD |
Cloud Run environment variable containing the service name. |
| Constant | CLOUD |
Cloud Run environment variable containing the worker-pool name. |
| Constant | DEFAULT |
Default timeout for tracing force-flush operations. |
| Constant | DEFAULT |
Default interval between Temporal Core metric exports. |
| Constant | DEFAULT |
Default local OTLP gRPC collector endpoint. |
| Constant | DEFAULT |
Service name used outside a recognized Cloud Run environment. |
| Constant | OTEL |
Standard OpenTelemetry environment variable for the common OTLP endpoint. |
| Constant | OTEL |
Standard OpenTelemetry environment variable for service.name. |
def build_metrics_telemetry_config(*, endpoint:
str | None = None, service_name: str | None = None, metric_periodicity: timedelta | None = None) -> TelemetryConfig:
(source)
¶
Build Temporal Core telemetry with Google Cloud Run defaults.
This helper is useful when the application needs to customize runtime
logging or other telemetry settings before constructing a
temporalio.runtime.Runtime.
| Parameters | |
endpoint:str | None | OTLP gRPC endpoint, with the same resolution order as
OpenTelemetryPlugin. |
servicestr | None | Service name, with the same resolution order as
OpenTelemetryPlugin. |
metrictimedelta | None | Metric export interval. Defaults to 60 seconds. |
| Returns | |
TelemetryConfig | Telemetry configuration ready for a Temporal runtime. |