Skip to content

Routing traces #2790

@vitalik

Description

@vitalik

Question

What's the best way to route tracing destination for different agents?

I'm using Langfuse for tracing

initialization insturction is the following

from pydantic_ai.agent import Agent
 
Agent.instrument_all()

but my goal is that if I have two agents - I want one to trace to one server, and 2nd to other

agent1 = Agent('gpt-4o')  # This should send traces to https://langfuseserver1.com/
agent2 = Agent('somelocalmodel')  # This should send traces to https://langfuseserver2.com/

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions