• Vũ Hoàng Anh's avatar
    feat: complete Langfuse integration with propagate_attributes for user_id tracking · f057ad1e
    Vũ Hoàng Anh authored
    - Removed OpenTelemetry (TracerProvider, OTLPSpanExporter, LoggingInstrumentor, FastAPIInstrumentor)
    - Implemented Langfuse v3.11.0 with CallbackHandler for LLM tracing
    - Added langfuse_trace_context() with propagate_attributes() for proper user_id filtering
    - Fixed user_id to appear in Langfuse User ID filter (not just metadata)
    - Added session_id and tags propagation for trace organization
    - Updated controller.py to wrap graph execution in langfuse_trace_context
    - Verified traces send to self-hosted Langfuse at http://172.16.2.207:3009
    - Configuration: LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, LANGFUSE_BASE_URL in .env
    
    GIAI_DOAN_1 COMPLETE: LLM observability via Langfuse SDK
    Next: GIAI_DOAN_2 - Container monitoring stack (cAdvisor + Prometheus + Grafana)
    f057ad1e
prompt.py 6.61 KB