Setup
Core OpenTelemetry tracing utilities and setup for Pipecat.
- pipecat.utils.tracing.setup.is_tracing_available()[source]
Returns True if OpenTelemetry tracing is available and configured.
- Returns:
True if tracing is available, False otherwise.
- Return type:
bool
- pipecat.utils.tracing.setup.setup_tracing(service_name='pipecat', exporter=None, console_export=False)[source]
Set up OpenTelemetry tracing with a user-provided exporter.
- Parameters:
service_name (str) – The name of the service for traces
exporter – A pre-configured OpenTelemetry span exporter instance. If None, only console export will be available if enabled.
console_export (bool) – Whether to also export traces to console (useful for debugging)
- Returns:
True if setup was successful, False otherwise
- Return type:
bool
Example
# With OTLP exporter from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
exporter = OTLPSpanExporter(endpoint=”http://localhost:4317”, insecure=True) setup_tracing(“my-service”, exporter=exporter)