Launch Week 02 wrapped — explore all five launches

Send Traces to Projects

Send traces to different projects on Confident AI

Included on the Enterprise plan. Book a demo, opens in a new tab. Included on the Team plan. Included on the Starter plan. Not included on the Free plan.

Overview

You can specify which project each trace should be sent to by setting the Confident API key on a trace. This is especially useful when you need to separate traces to different projects within the same LLM application.

Route Traces to Projects

You can use update_current_trace to set the confident_api_key for a specific trace.

main.py
from deepeval.tracing import observe, update_current_trace
from openai import OpenAI

client = OpenAI()

@observe()
def llm_app(query: str):
    res = client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": query}]
    ).choices[0].message.content

    if query == "Write me a poem.":
        update_current_trace(confident_api_key="confident-api-key-1")
    else:
        update_current_trace(confident_api_key="confident-api-key-2")
    return res

llm_app("Write me a poem.")
Ready to monitor AI in production?Connect traces, alerts, dashboards, and evals in one production workflowBook a demo

Last updated on

Built byConfident AI