Skip to content

Langfuse is very noisy locally when not configured #605

Description

@josephjclark

I don't have langfuse configured locally (and don't particualrly want to). So when I run apollo, my console is bombarded with langfuse errors:

Authentication error: Langfuse client initialized without public_key. Client will be disabled. Provide a public_key parameter or set LANGFUSE_PUBLIC_KEY environment variable. 
WARNING:langfuse:Authentication error: Langfuse client initialized without public_key. Client will be disabled. Provide a public_key parameter or set LANGFUSE_PUBLIC_KEY environment variable. 
INFO:global_chat.global_chat:Global agent called with content: what commcare field does patient.gender get mapped from? Check the actual implementation here in the...
WARNING:langfuse:Authentication error: Langfuse client initialized without public_key. Client will be disabled. Provide a public_key parameter or set LANGFUSE_PUBLIC_KEY environment variable. 
WARNING:langfuse:Context error: No active span in current context. Operations that depend on an active span will be skipped. Ensure spans are created with start_as_current_observation() or that you're operating within an active span context.
INFO:global_chat.router:RouterAgent initialized with model: claude-haiku-4-5-20251001
WARNING:langfuse:Authentication error: Langfuse client initialized without public_key. Client will be disabled. Provide a public_key parameter or set LANGFUSE_PUBLIC_KEY environment variable. 
INFO:global_chat.router:Router.route_and_execute() called
WARNING:langfuse:Authentication error: Langfuse client initialized without public_key. Client will be disabled. Provide a public_key parameter or set LANGFUSE_PUBLIC_KEY environment variable. 
INFO:global_chat.router:Router decision: planner (confidence: 5, job_key: None)
INFO:global_chat.router:Routing to planner
INFO:global_chat.planner:PlannerAgent initialized with model: claude-opus-4-8
WARNING:langfuse:Authentication error: Langfuse client initialized without public_key. Client will be disabled. Provide a public_key parameter or set LANGFUSE_PUBLIC_KEY environment variable. 

These are super distracting when trying to read the logs and understand what's going on internally.

I'd love to rethink the langfuse code and find a way to sidestep all these errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions