Skip to main content

Layer 1: Configure AI agent tracing

Configure your AI agent application to send traces to the Virtana platform so you can monitor latency, errors, and service dependencies in Global View.

Before you begin

Configure Virtana Platform tracing in Global View Topology to deploy the trace gateway before you configure agent tracing. Agent tracing requires that the gateway be deployed and running.

How agent tracing works

Your application sends OpenTelemetry (OTel) traces to the Virtana trace gateway, which forwards them to the Virtana platform. To identify a trace as an AI agent trace, the platform checks for specific resource attributes. When the required attributes are present, the platform tags the trace automatically and displays the agent name in Global View.

Adding these attributes to your traces is the only difference from standard Virtana Platform tracing. The rest of the process is the same.

The following table describes the components involved in agent tracing.

Table 244. Agent tracing components

Component

Description

AI agent application

You add the agent resource attributes to this application’s OpenTelemetry resource configuration.

Virtana trace gateway

Receives traces from your application and forwards them to the Virtana platform. Set up as described in Configuring Virtana platform tracing.

Virtana Platform

Receives tagged trace data and makes it visible in Global View, Traces, and Trace paths.



Set the agent attributes

Add the following OpenTelemetry resource attribute to your application’s resource configuration. Set the value to match your environment.

Table 245. OpenTelemetry resource attributes for AI agent tracing

Attribute

Example value

Purpose

langfuse.observation.metadata.virtana-agent

my-llm-agent

Identifies the trace as an AI agent trace and sets the agent name displayed in the platform



When this attribute is present in your trace, the Virtana platform automatically recognizes the source as an AI agent and displays it in the trace view.

Note

Note

For the resource attributes required to link a trace to a Kubernetes pod, container, and deployment, see Configuring Virtana platform tracing. Those attributes apply to all Virtana platform tracing, not only to AI agent traces.

Verify that your agent appears in traces

After you add the attributes, confirm that the platform is recognizing your agent correctly. This verification follows the same process as standard Virtana platform tracing. For troubleshooting guidance, see Configuring Virtana platform tracing.

To verify that your agent appears in traces:

  1. Send a test request to your AI agent application. For example, send a query to your model endpoint.

  2. Sign in to the Virtana Platform.

  3. Navigate to Observability > Traces.

  4. In the Service filter, select the agent name you set as the attribute value.

  5. Confirm that a trace appears with the correct agent name. The trace displays the request path, latency, and span details for each step your agent performed.

Note

If your agent does not appear after two minutes, confirm that the virtana-agent attribute is set correctly in your application’s resource configuration. Check that the name and value match exactly, including case.

You can see the agent trace view in the Virtana Platform after the resource attribute is correctly configured. The agent name, request path, and span latency are visible in the Traces view.

image3.png

You can see the Topology view which shows the agent call chain from intake through diagnosis to downstream services, with per-hop latency and request counts.

image4.png