OpenTelemetry
OpenTelemetry instrumentation and tracing utilities for DiracX routers.
This module provides integration with OpenTelemetry for distributed tracing, metrics collection, and observability of API requests.
otel
Classes
OTELSettings
Bases: ServiceSettingsBase
Settings for the Open Telemetry Configuration.
Source code in diracx-routers/src/diracx/routers/otel.py
Attributes
model_config = SettingsConfigDict(env_prefix='DIRACX_OTEL_')
class-attribute
instance-attribute
enabled = False
class-attribute
instance-attribute
application_name = 'diracx'
class-attribute
instance-attribute
grpc_endpoint = ''
class-attribute
instance-attribute
grpc_insecure = True
class-attribute
instance-attribute
headers = None
class-attribute
instance-attribute
Functions
instrument_otel(app)
Instrument the application to send OpenTelemetryData. Metrics, Traces and Logs are sent to an OTEL collector. The Collector can then redirect it to whatever is configured. Typically: Jaeger for traces, Prometheus for metrics, ElasticSearch for logs.
Note: this is highly experimental, and OpenTelemetry is a quickly moving target