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
      • Name
      • Tags
      • Metadata
      • Users
    • 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
  • Set Name on Trace
  • Set Name on Span
LLM TracingCustomize Traces

Name

Giving names to your traces for better visbility on Confident AI
Was this page helpful?
Previous

Tags

Adding tags to your traces for better visibility on Confident AI
Next
Built with

Overview

Both traces and spans have names, and you can customize them based on your liking for better UI display.

Set Name on Trace

You can name a trace at runtime by providing the name parameter in the update current trace function:

Python
TypeScript
main.py
1from openai import OpenAI
2from deepeval.tracing import observe, update_current_trace
3
4client = OpenAI()
5
6@observe()
7def llm_app(query: str):
8 update_current_trace(name="Call LLM")
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.")

By default, the name on a trace is set to None.

Set Name on Span

The default name for a span is the name of the function/method you’re observing. If you wish to overwrite this behavior, simply provide a name to the update current span function:

Python
TypeScript
main.py
1from openai import OpenAI
2from deepeval.tracing import observe, update_current_span
3
4client = OpenAI()
5
6@observe()
7def llm_app(query: str):
8 update_current_span(name="Call LLM")
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.")