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
  • Configure Environment
LLM TracingTrace Management

Environment

Set your environments during tracing for better debugging
Was this page helpful?
Previous

Masking

Protect your sensitive information from traces using the masking feature
Next
Built with

Overview

The environment feature allows you to specify which environment your traces are coming from. This is useful for separating traces from different environments in "development", "staging", "production", or "testing".

Traces from component-level evals are automatically classified in the "testing" enviornment.

Configure Environment

You can configure the environment with the CONFIDENT_TRACE_ENVIRONMENT environment variable.

$export CONFIDENT_TRACE_ENVIRONMENT="staging"

Alternatively, you can set the environment directly in code:

Python
TypeScript
main.py
1from openai import OpenAI
2from deepeval.tracing import observe, trace_manager
3
4trace_manager.configure(environment="production")
5client = OpenAI()
6
7@observe()
8def llm_app(query: str):
9 return client.chat.completions.create(
10 model="gpt-4o",
11 messages=[{"role": "user", "content": query}]
12 ).choices[0].message.content
13
14llm_app("Write me a poem.")

The environment can be either "production", "staging", or "development", and helps you identify where your traces are coming from.