feat: custom telemetry configuration

This commit is contained in:
Abhishek Kumar 2026-03-23 11:36:39 +05:30
parent 1967a71935
commit affb39e57f
23 changed files with 927 additions and 139 deletions

View file

@ -27,6 +27,7 @@ from fastapi.middleware.cors import CORSMiddleware
from loguru import logger
from api.routes.main import router as main_router
from api.services.pipecat.tracing_config import load_all_org_langfuse_credentials
from api.tasks.arq import get_arq_redis
API_PREFIX = "/api/v1"
@ -37,6 +38,10 @@ async def lifespan(app: FastAPI):
# warmup arq pool
await get_arq_redis()
# Pre-register all org-specific Langfuse exporters so they're ready
# before any pipeline runs, without per-call DB lookups.
await load_all_org_langfuse_credentials()
yield # Run app
# Shutdown sequence - this runs when FastAPI is shutting down