For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Trust CenterStatusSupportGet a demoPlatform
DocumentationEvals API ReferenceIntegrations & OTELPlatform SettingsSelf-HostingChangelog
DocumentationEvals API ReferenceIntegrations & OTELPlatform SettingsSelf-HostingChangelog
  • Get Started
    • Introduction
    • Setup and Installation
  • LLM Evaluation
    • Introduction
    • Experiments
  • Metrics
    • Introduction
    • Metric Collections
    • Custom Metrics
  • LLM Tracing
    • Introduction
      • Projects
      • Environment
      • Masking
      • Sampling
      • Dropping Traces
    • Signals
    • Troubleshooting
  • Human-in-the-Loop
    • Introduction
    • Collect Feedback
  • Reporting & Analytics
    • Dashboards
    • Executive Insights
  • Red Teaming
    • Introduction
    • Quickstart
    • Frameworks & Policies
    • Risk Profiles
    • Red Team Using DeepTeam
  • Resources
    • Why Confident AI
    • Support
    • Data Handling
    • LLM Use Cases
LogoLogo
Trust CenterStatusSupportGet a demoPlatform
On this page
  • Overview
  • Route Traces to Projects
LLM TracingTrace Management

Projects

Send traces to different projects on Confident AI
Was this page helpful?
Previous

Environment

Set your environments during tracing for better debugging
Next
Built with

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.

The Confident API key is unique to each project and can be found in your project settings on Confident AI.

Route Traces to Projects

Python
TypeScript

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

main.py
1from deepeval.tracing import observe, update_current_trace
2from openai import OpenAI
3
4client = OpenAI()
5
6@observe()
7def llm_app(query: str):
8 res = client.chat.completions.create(
9 model="gpt-4o",
10 messages=[{"role": "user", "content": query}]
11 ).choices[0].message.content
12
13 if query == "Write me a poem.":
14 update_current_trace(confident_api_key="confident-api-key-1")
15 else:
16 update_current_trace(confident_api_key="confident-api-key-2")
17 return res
18
19llm_app("Write me a poem.")

confident_api_key overrides the CONFIDENT_API_KEY environment variable.