Connect application tracing data to audit
If your AI application is already connected to AgentLoop observability and continuously reports application tracing data (Traces), you can select the application services to audit in Audit Management. The model call and tool call information in the Traces is converted into audit events, so you do not need to configure application log ingestion again for the same application. After the conversion, you can browse Sessions and the related behavior context in Audit Facts. After you enable application risk detection, you can also analyze the corresponding risk events in Risk Audit.
Scenarios
Connecting application tracing data to audit is suitable for the following scenarios:
-
You can already view the Trace data of the application in AI Agent Observability > Tracing and want to reuse the data for auditing.
-
You want to audit only some applications. You can select the conversion scope by
serviceName. -
You want to view audit facts such as model requests, model responses, tool calls, and tool results.
If an application is already connected to audit through AI Application Logs, we recommend that you do not convert the Traces of that application. Otherwise, the same behavior enters audit repeatedly.
Prerequisites
Before you start, make sure that the following conditions are met:
-
AgentLoop is activated and an AgentSpace is created.
-
The Traces of the target application are connected to the current AgentSpace and have generated data within the last 24 hours.
-
The Traces contain a valid
serviceNameand contain at least call records of the LLM or Tool type.
The completeness of Trace fields affects the converted audit content. For example, if the source Trace does not provide user, session, or Agent type information, the corresponding information on the audit pages may also be incomplete.
Procedure
Step 1: Go to Audit Management
-
Log on to the AgentLoop console and select the target AgentSpace.
-
In the left-side navigation pane, choose Audit > Audit Management.
-
If the page displays Initialize Agent Security Audit Resources, click Initialize Resources, wait until the page indicates that the resources are ready, and then click Go to Agent Audit. If you are taken directly to the Audit Management page, skip this step.
If initialization fails, click Retry Initialization. If the page indicates that initialization takes a long time, try again later. Preparation work that has already been completed is not performed again.
Step 2: Select application services
-
In the Audit Data Source Ingestion section, find the row whose group is AI Application and whose data source is Application Tracing.
-
Click Manage Conversion Scope.
-
In the Manage Application Tracing Conversion Scope dialog box, search for and select the
serviceNamevalues that you want to connect to audit.Field
Description
serviceNameThe service identifier in the Trace, which is used to distinguish different AI applications or services.
LLM statistics
The number of LLM call records detected within the last 24 hours.
Tool statistics
The number of tool call records detected within the last 24 hours.
-
Confirm the number of selected services displayed on the page, and then click Save Configuration.
After the configuration is saved, the status of Application Tracing is displayed as N services configured. serviceName is case-sensitive. Select values based on the actual values in the Traces.
Verify the ingestion result
After you complete the configuration, perform the following steps to verify the result:
-
Initiate a new request that contains a model call or tool call in the target application.
-
After a while, refresh the Audit Management page. In the Ingested Data Observation section, view AI Application Tracing Data.
-
Confirm that the target application appears in the list, and check the following information:
-
Agent type.
-
Agent application name.
-
Last data time.
-
Event volume trend over the last 24 hours.
-
-
Click View on the right side of the target application to go to Audit Facts and view the model call and tool call context of the corresponding Session.
N services configured indicates that the conversion scope has been saved. To determine whether audit data has been generated, refer to the actual data in the AI Application Tracing Data list and in Audit Facts.
If you also need to view risk results, go to Detection Configuration in Audit Management and enable Application Risk Detection. If application risk detection is not enabled, you can still view the audit facts that have been ingested, but no new application risk detection results are generated.
Adjust or stop the conversion
-
In the Audit Data Source Ingestion section, find Application Tracing and click Manage Conversion Scope.
-
Select the services that you want to add, or clear the services that no longer need to be converted.
-
Click Save Configuration.
After you clear a service, the system no longer converts new Traces that the service subsequently generates. Audit data that has already been generated is not automatically deleted and is retained based on the data retention rules of the current AgentSpace.
Conversion scope
-
The system converts only the LLM and Tool type call records under the selected
serviceNamevalues. -
Trace nodes of other types are not ingested as model call or tool call audit events.
-
After you add an application service, you must open Manage Application Tracing Conversion Scope again and select the corresponding
serviceName. -
The converted fields and values come from the source Traces. Content that the source data does not provide is not automatically filled in.
-
If the same application is ingested through both application logs and application tracing, duplicate data may be generated. If the page displays a suspected duplicate ingestion prompt, we recommend that you keep only one ingestion method and clear the duplicate service in the conversion scope.
FAQ
The target service cannot be found in the conversion scope
Check the following items in sequence:
-
Whether the currently selected AgentSpace is the same as the AgentSpace to which the Traces belong.
-
Whether the target service has generated new Traces within the last 24 hours.
-
Whether the
serviceNameof the Traces is valid. -
Whether the Traces contain call records of the LLM or Tool type.
-
Whether an application with the same name is already connected to audit through AI application logs.
The conversion scope is saved, but no audit data is displayed
First initiate a new model call or tool call in the target application, and then refresh the Audit Management page. If there is still no data, confirm that the source Traces can be queried as expected, and check whether the status of Application Tracing is displayed as Processing Error.
The page displays a suspected duplicate ingestion prompt
This prompt indicates that the same application may be ingested through both application logs and application tracing. Click Manage Conversion Scope, clear the duplicate serviceName, and then save the configuration.