diff --git a/examples/open-telemetry-tracing/bot.py b/examples/open-telemetry-tracing/bot.py index f4d6d76ac..0b44c3865 100644 --- a/examples/open-telemetry-tracing/bot.py +++ b/examples/open-telemetry-tracing/bot.py @@ -9,7 +9,7 @@ import os from dotenv import load_dotenv from loguru import logger -from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter from pipecat.adapters.schemas.function_schema import FunctionSchema from pipecat.adapters.schemas.tools_schema import ToolsSchema @@ -35,7 +35,10 @@ IS_TRACING_ENABLED = bool(os.getenv("ENABLE_TRACING")) # Initialize tracing if enabled if IS_TRACING_ENABLED: # Create the exporter - otlp_exporter = OTLPSpanExporter() + otlp_exporter = OTLPSpanExporter( + endpoint=os.getenv("OTEL_EXPORTER_OTLP_ENDPOINT", "http://localhost:4317"), + insecure=True, + ) # Set up tracing with the exporter setup_tracing( diff --git a/examples/open-telemetry-tracing/requirements.txt b/examples/open-telemetry-tracing/requirements.txt index a400a9649..7f5abb16d 100644 --- a/examples/open-telemetry-tracing/requirements.txt +++ b/examples/open-telemetry-tracing/requirements.txt @@ -1,6 +1,6 @@ fastapi uvicorn python-dotenv -git+https://github.com/pipecat-ai/pipecat.git@main#egg=pipecat-ai[webrtc,silero,cartesia,deepgram,openai,tracing] -git+https://github.com/pipecat-ai/small-webrtc-prebuilt.git@main#egg=pipecat-ai-small-webrtc-prebuilt -opentelemetry-exporter-otlp-proto-http \ No newline at end of file +pipecat-ai[webrtc,silero,cartesia,deepgram,openai,tracing] +pipecat-ai-small-webrtc-prebuilt +opentelemetry-exporter-otlp-proto-grpc \ No newline at end of file