Attribution analysis
Based on the performance, cost, and trace characteristics of AI Agent traces, the Attribution Analysis feature displays traces in a two-dimensional distribution chart and compares the feature differences between abnormal traces and baseline traces. This helps you quickly identify the applications, Agents, models, tool calls, and token consumption characteristics that are concentrated in abnormal samples.
Attribution analysis lets you filter data by trace, and also lets you start the analysis from a specific topic of intelligent clustering. In the distribution chart, you can select the traces that you want to focus on, view the features that differ significantly between the abnormal group and the baseline group, and then drill down into the trace details or use the intelligent analysis capability to obtain diagnostic suggestions.
Attribution results describe the differences in feature distribution between the abnormal group and the baseline group. They provide troubleshooting clues and do not indicate a definite causal relationship between a feature and an anomaly.
Prerequisites
You have activated Cloud Monitor 2.0 and created a workspace.
You have ingested your AI Agent's observability data into the current workspace. For information about how to ingest AI Agent observability data, see AI Agent Observability integration overview.
Trace data that contains trace IDs, latency, TTFT, token, or cache metrics exists within the selected time range.
To analyze data by clustering result, you must first create a trace clustering task and complete at least one run that contains valid topics.
To use AI-generated analysis or deep analysis, you must have permissions to use the STAROps intelligent analysis capability.
Procedure
Log on to the Cloud Monitor 2.0 console, select the target workspace, choose AI Agent Observability in the left-side navigation pane, and go to the Clustering and Attribution page.
You can use attribution analysis in the following ways:
Standalone analysis: go to the attribution analysis section and select Search by Trace or Search by Cluster.
Drill down from intelligent clustering: in the trace clustering results, open the details of the target topic and then click Attribution Analysis. The system automatically applies the current clustering task, run record, topic, and run time range.
Analysis process
The basic process of attribution analysis is as follows:
Select the range of traces that participate in the analysis.
Select a performance or cost analysis target.
Observe the trace distribution in the two-dimensional distribution chart and select the area that you want to troubleshoot.
Use the traces in the selected area as the comparison group and compare them with the other traces within the current range.
View the intelligent analysis, the top attribution dimensions, and the abnormal traces, and then continue to drill down into the trace details.
Select the analysis scope
Attribution analysis supports two methods: Search by Trace and Search by Cluster.
Search by Trace
Search by Trace reads traces based on the query time range of the current page. You can use the following fields to narrow the analysis scope.
Filter field | Description |
AI application | Filters data by the application that a trace passes through. This field is suitable for analyzing abnormal requests within a specific application. |
AI Agent | Filters data by the Agent that a trace calls. This field is suitable for focusing on the execution of a specific Agent. |
Skill | Filters data by the Skill that a trace calls. This field is suitable for analyzing performance or cost issues that are related to a specific Skill. |
The filter fields support search, multiple selection, select all, and clear. A trace matches a condition as long as it contains a selected value. If you configure multiple filter fields, the system applies all of these conditions at the same time. The candidate values of each field are updated dynamically based on the other selected conditions.
Search by Cluster
Search by Cluster is used to analyze the traces within a specific intelligent clustering topic. Select the following items in sequence:
Parameter | Description |
Task | Select a trace clustering task. |
Run Record | Select a run record of the task that contains valid clustering results. |
Topic | Select one topic of the current run. The topic options also display the number of traces that each topic contains. |
Run Time Range | The system uses the data time range of the selected run to read the clustering results. You do not need to configure this item separately. |
When you go to attribution analysis from the details of an intelligent clustering topic, the system automatically fixes the task, the run record, and the topic. This prevents changes in the data criteria that would be caused by switching the context during the analysis.
Search by Cluster uses the data time range of the clustering run. It does not use the global time range that is currently selected on the attribution page or in the console.
Select the analysis target
The page provides optional two-dimensional metric combinations based on the analysis type. After you select an analysis type and a dimension, the system automatically updates the horizontal axis, the vertical axis, and the metric units of the distribution chart.
Different analysis types are suitable for different troubleshooting directions:
Performance analysis: used to observe performance characteristics such as response latency, first token return, and model output efficiency.
Cost analysis: used to observe resource consumption characteristics such as token usage and cache utilization.
The available dimensions may be adjusted as the product capabilities evolve. The dimensions that are actually displayed on the page take precedence.
The Query Count on the page controls the number of traces that are read for this distribution analysis.
A larger query count covers more traces, but increases the time that is required for the query and the comparative analysis. If the data volume is large, we recommend that you first narrow the scope by time range, application, Agent, Skill, or clustering topic, and then gradually increase the query count.
View the two-dimensional trace distribution
After you select the scope and the dimensions, the page displays the trace distribution in a two-dimensional scatter chart:
Each point represents one trace.
The horizontal axis and the vertical axis are determined by the analysis dimensions that are currently selected.
Move the pointer over a point to view the trace ID and the metric values of the two dimensions.
Click a point to open the trace details, where you can view the complete trace, the span hierarchy, and the input and output information.
Drag in the chart to select the traces that you want to analyze further.
If a trace lacks the metrics that are required by the current dimensions, or if the metric values are invalid, the trace is not displayed in the current distribution chart. Therefore, the number of traces in the chart may be less than the query count or the total number of traces in the clustering topic.
Select abnormal traces
Drag in the two-dimensional distribution chart to select the area that you want to troubleshoot. After the selection is complete, the page displays the following information:
The number of traces that the comparison group contains.
The average value of the horizontal axis metric of the comparison group.
The average value of the vertical axis metric of the comparison group.
An entry point that is used to copy the selected trace IDs.
The Comparative Analysis operation.
The traces in the selected area serve as the comparison group, and the other traces within the current query range that are not in the selected area serve as the baseline group. After you click Comparative Analysis, the system compares the feature distributions of the two groups of traces and generates attribution results that are sorted by difference.
Before you make a selection, confirm the names, units, and metric directions of the current horizontal and vertical axes, and then select the abnormal area based on your business goals. Different metrics may have different directions for determining anomalies. You cannot uniformly assume that a larger value is more abnormal, and you must not always use a specific quadrant as the abnormal area.
The selected area is defined by the user. The system does not automatically identify a specific quadrant as abnormal. If the selected range is unreasonable, the comparison results may not reflect the actual issue.
View the attribution results
After the comparative analysis is complete, the page displays the AI-generated analysis and the top attribution dimensions. If you use Search by Trace, the abnormal trace details are also displayed.
AI-generated analysis
Based on the attribution conditions with a high degree of difference, the system generates an analysis summary for Agent development and O&M personnel. The summary usually contains:
The main characteristics of the current performance or cost anomaly.
The proportion of traces in the comparison group that meet the feature condition.
The proportion of traces in the baseline group that meet the same condition.
The trace, token, model, tool, or user dimensions that we recommend you focus on first.
The AI-generated analysis is used to summarize existing attribution results. It does not replace the original comparison data. We recommend that you verify the conclusions together with the top attribution dimensions and the trace details.
Top attribution dimensions
The top attribution dimensions are sorted by the degree of difference in the distribution between the comparison group and the baseline group. The page preferentially displays the candidate dimensions with more significant differences. If more results exist, you can expand the list to view them.
Each attribution dimension contains the following information:
Field | Description |
Feature condition | The current feature, the comparison operator, and the threshold or enumerated value. For example, "the tool name contains a specific tool" or "the input tokens are greater than a specific value". |
Difference | The difference in the coverage proportion of the feature condition between the comparison group and the baseline group. The greater the difference, the stronger the ability of the condition to distinguish between the two groups of samples. |
Comparison group samples | The number and the proportion of traces in the comparison group that meet the condition. |
Baseline group samples | The number and the proportion of traces in the baseline group that meet the same condition. |
The features that may participate in attribution include:
Feature category | Examples of attribution dimensions |
Call scope | User ID, the applications that are passed through, and the Agents that are passed through. |
Models and tools | The models that are used and the tools that are used. |
Call complexity | The number of LLM rounds, the number of Agent calls, and the number of tool calls. |
Errors | The number of LLM errors and the number of tool errors. |
Tokens and context | Input tokens, output tokens, and the maximum input tokens of a single LLM call. |
Response latency | Trace latency, average LLM response time, average tool response time, and TTFT. |
Tool returns | The average return length of tools and the maximum return length of tools. |
The features that are actually displayed depend on the analysis type, the search method, and whether the corresponding fields exist in the trace data.
The degree of difference is not a fault contribution rate, and it cannot directly prove the root cause. For example, "the abnormal group uses a specific model more often" indicates only that the model is more concentrated in the abnormal group. You still need to continue the verification together with the model parameters, the context, and the trace details.
Abnormal trace details
After you complete the comparative analysis by using Search by Trace, the page displays the representative details of the selected traces, including:
Field | Description |
Trace ID | The unique identifier of the trace. Click it to open the trace details. |
Session ID | The identifier of the session to which the trace belongs. |
Start time | The start time of the trace. |
Latency | The overall execution latency of the trace. |
LLM rounds | The number of LLM calls in the trace. |
Input token consumption | The total number of input tokens of all LLM calls in the trace. |
Output token consumption | The total number of output tokens of all LLM calls in the trace. |
Tool calls | The total number of tool calls in the trace. |
Tool errors | The number of tool calls in the trace that failed to be executed. |
The details support pagination and adjusting the number of entries per page. After you click a trace ID, you can view the complete trace based on the current attribution time range.
Deep analysis
Attribution analysis is used to discover the feature differences between the abnormal group and the baseline group. If you want to further locate the root cause of an issue based on these clues, we recommend that you use STAROps in-depth analysis.
After you click Deep Analysis, the system selects trace samples from the currently selected range and passes the samples together with their workspace and analysis time range to STAROps. STAROps performs an in-depth analysis of the complete traces and the Agent runtime reasoning paths of these traces. Based on the task progress, the span hierarchy, the sequence of LLM and tool calls, retry and error information, latency, and token usage, STAROps helps you locate more specific problem points and possible causes.
The AI-generated analysis and the deep analysis are provided and billed by STAROps. Before you use them, see STAROps billing.
Analysis recommendations
When you use the feature for the first time, we recommend that you select a smaller query count. After you confirm the distribution and the metric ranges, gradually increase the query count.
Both the comparison group and the baseline group must contain a sufficient number of traces. If the number of samples is too small, the features of individual traces may be amplified.
Focus first on the conditions that have a high degree of difference, high coverage in the comparison group, and low coverage in the baseline group.
Explain enumerated features by using expressions such as "concentrated in", "more often passes through", or "more often uses". Do not state them directly as root causes.
Retain the original comparison operators and thresholds for numeric features. For example, "less than a specific value" must not be rewritten as "relatively high".
After you modify the filter conditions, the analysis type, the metric dimensions, or the clustering topic, you must make the selection again and run the comparative analysis again.
The final judgment must be made together with the trace details, the model configurations, the tool returns, the error information, and the version changes.
Common use cases
Slow trace troubleshooting: select the performance dimensions that are related to response latency, and compare the LLM response time, the tool response time, the number of call rounds, and the errors.
Model output performance analysis: select the performance dimensions that are related to first token return or model output efficiency, and analyze the model, the input tokens, and the LLM trace characteristics.
Token cost optimization: select the cost dimensions that are related to token usage or cache utilization, and analyze the context size and the model usage.
Tool chain anomaly analysis: observe whether the abnormal group is concentrated on a specific tool, or whether significant differences exist in the number of tool calls, the number of errors, the return length, and the average latency.
Agent and application scope troubleshooting: determine whether abnormal traces are concentrated in a specific application, Agent, model, tool, or user.
Diagnosis within a clustering topic: start attribution from the details of an intelligent clustering topic to compare only the traces within the same business topic, which reduces the interference of different user intents on the metrics.
FAQs
Why is the number of traces in the distribution chart less than the query count?
The query count indicates the read upper limit. Traces that lack the current horizontal axis or vertical axis metrics, or whose metrics are empty or invalid, are filtered out. Therefore, the number of traces that are actually displayed may be smaller.
Why are there no attribution results?
The possible causes include:
The selected area does not contain any valid traces.
The comparison group or the baseline group contains too few samples.
The available features of the two groups of traces do not differ significantly.
The current traces lack attribution fields such as model, tool, token, or latency.
No valid data exists in the selected time range, clustering run, or topic.
We recommend that you adjust the selected range, increase the query count, or narrow the scope to a more specific application, Agent, Skill, or clustering topic, and then try again.
Are attribution results equivalent to root causes?
No. Attribution results describe which features have significant distribution differences between the abnormal group and the baseline group. They help you narrow the troubleshooting scope, but they cannot directly prove the root cause of an issue.
If you want to further locate the root cause, we recommend that you select representative abnormal traces and then use STAROps in-depth analysis. Based on the selected trace samples, STAROps continues to analyze the complete traces and the Agent runtime reasoning paths, and provides more in-depth diagnostic clues based on the trace details, the task progress, the error information, and the runtime metrics. We still recommend that you verify the final conclusion together with logs, configurations, and version changes.