diff --git a/api/requirements.txt b/api/requirements.txt index 844738d1..79070d68 100644 --- a/api/requirements.txt +++ b/api/requirements.txt @@ -1,4 +1,4 @@ -langfuse==3.9.3 +langfuse==4.6.1 fastapi==0.135.3 asyncpg==0.30.0 alembic==1.16.5 diff --git a/api/services/pipecat/tracing_config.py b/api/services/pipecat/tracing_config.py index 6a88af08..3ab8ad3a 100644 --- a/api/services/pipecat/tracing_config.py +++ b/api/services/pipecat/tracing_config.py @@ -75,7 +75,10 @@ class _OrgRoutingExporter(SpanExporter): self._org_hosts[key] = normalized_host exporter = OTLPSpanExporter( endpoint=endpoint, - headers={"Authorization": f"Basic {auth}"}, + headers={ + "Authorization": f"Basic {auth}", + "x-langfuse-ingestion-version": "4", + }, ) self._org_exporters[key] = exporter logger.info(f"Registered OTEL exporter for org {org_id}") @@ -158,7 +161,10 @@ def ensure_tracing() -> bool: ).decode() default_exporter = OTLPSpanExporter( endpoint=f"{LANGFUSE_HOST}/api/public/otel/v1/traces", - headers={"Authorization": f"Basic {langfuse_auth}"}, + headers={ + "Authorization": f"Basic {langfuse_auth}", + "x-langfuse-ingestion-version": "4", + }, ) _org_routing_exporter = _OrgRoutingExporter(default_exporter)