🔍Trace Analytics

Overview

Trace Analytics provides visibility into your AI agent workflows, helping you understand performance and costs across your AI operations. A "trace" represents a complete workflow execution—from the initial request through all agent interactions to the final response. By grouping related AI transactions under a single trace ID, you can analyze the full picture of complex AI workflows.

Key Benefits

  • Performance Optimization: Identify slow operations and bottlenecks in your AI workflows

  • Cost Management: Track and analyze spending across models, providers, and trace types

  • Workflow Analysis: Understand transaction patterns and execution flow within traces

  • Detailed Insights: Drill down into individual transactions for granular analysis


Getting Started

Navigate to Traces from the main navigation menu to access the Trace Analytics dashboard. The page is organized with a tab-based interface:

  1. Cost Tab: Analyze costs across your traces and trace types

  2. Performance Tab: Monitor duration and performance metrics

Each tab provides metric cards, trend charts, data tables, and the ability to drill down into individual trace details.


Cost Tab

The Cost tab helps you understand and manage spending across your AI workflows.

Summary Metrics

At the top of the Cost tab, four metric cards provide an at-a-glance summary:

  • Total Cost: Cumulative spending across all traces in the selected time period

  • Average Cost: Typical cost per trace

  • P95 Cost: The 95th percentile cost—95% of traces cost less than this amount

  • Trend: Percentage change in cost compared to the previous period (positive or negative)

A time series chart visualizes how costs are trending over the selected time period. Each trace type is represented as a separate line, allowing you to:

  • See overall cost trends over time

  • Compare costs across different trace types

  • Identify spikes or anomalies in spending

  • Click on a trace type in the chart legend to filter the table below

Cost by Trace Type Table

A detailed table shows cost metrics grouped by trace type:

Column
Description

Trace Type

The workflow category (e.g., chat-completion, document-analysis)

Total Cost

Cumulative cost for this trace type

Average Cost

Mean cost per trace

P95 Cost

95th percentile cost

P99 Cost

99th percentile cost

Trend

Percentage change from previous period

Expandable Rows: Click on any trace type row to expand it and see individual traces. Click on a specific trace to open the Trace Detail View.


Performance Tab

The Performance tab helps you monitor execution times and identify slow operations.

Summary Metrics

Four metric cards provide performance highlights:

  • Average Duration: Mean execution time across all traces

  • P95 Duration: 95th percentile duration—95% of traces complete faster than this

  • P99 Duration: 99th percentile duration—the slowest 1% of traces

  • Trend: Percentage change in duration compared to the previous period

A time series chart shows how execution times are changing over the selected period. Each trace type appears as a separate line, enabling you to:

  • Track performance trends over time

  • Compare performance across trace types

  • Identify slowdowns or improvements

  • Click on a trace type to filter the table below

Performance by Trace Type Table

A detailed table shows performance metrics by trace type:

Column
Description

Trace Type

The workflow category

Average Duration

Mean execution time

P95 Duration

95th percentile duration

P99 Duration

99th percentile duration

Expandable Rows: Click on any row to expand and view individual traces. Select a trace to open the Trace Detail View.


Trace Detail View

When you click on a specific trace, a detailed view opens showing comprehensive information about that workflow execution.

Trace Summary Header

The header displays key identifying information:

  • Trace Type: The workflow category badge

  • Trace ID: Unique identifier for this trace (matches the traceId you pass in your API calls)

  • Task Type: The type of AI task performed

  • Agent: The AI agent that processed the trace

Below the identifiers, metric badges show:

  • Total Cost: Combined cost of all transactions in the trace

  • Duration: Total execution time

  • Time to First Token: Latency before the first response token

  • Total Tokens: Combined input and output tokens

  • Transaction Count: Number of AI operations in the trace

  • Success/Error Count: Number of successful vs failed transactions

Context badges provide organizational information:

  • Subscriber: The end user or API consumer

  • Organization: The customer organization

  • Product: The product being used

  • Environment: Production, staging, etc.

  • Provider: AI provider(s) used

  • Model: AI model(s) used

Transaction Timeline

A visual waterfall chart shows the sequence and timing of all transactions within the trace:

  • Horizontal Bars: Each bar represents a transaction, with length proportional to duration

  • Color Coding: Colors indicate the model/provider used

  • Tooltips: Hover over any bar to see transaction details including model, cost, duration, and token counts

  • Timing Information: The timeline shows start times and durations, helping identify bottlenecks

Breakdowns & Analytics

Four breakdown cards provide aggregated views of the trace:

  • Cost by Model: Stacked bar showing how costs are distributed across AI models used in the trace

  • Cost by Provider: Stacked bar showing cost distribution across AI providers

  • Token Breakdown: Stacked bar showing input vs output tokens

  • Duration by Task Type: Bar chart showing time spent on different operation types

Transaction Details Table

A comprehensive table lists all transactions in the trace with the following columns:

Column
Description

Timestamp

When the transaction occurred

Transaction ID

Unique identifier for the transaction

Task Type

Type of AI operation

Model

AI model used

Provider

AI provider

Input Tokens

Number of input tokens

Output Tokens

Number of output tokens

Total Tokens

Combined token count

TTFT

Time to first token (ms)

Duration

Total execution time

Cost

Transaction cost

Status

Success or error indication

Mediation

Revenium processing overhead

Credential

API credential used

Region

Deployment region

Export: Use the export button to download transaction details as a CSV file.

Row Click: Click on any transaction row to open the Transaction Details Drawer.

Transaction Details Drawer

A slide-out drawer provides in-depth information about a single transaction, organized into sections:

Overview

  • Model and provider

  • Task type and operation type

  • Stop reason with status indicator

Timing

  • Request time and response time

  • Duration and time to first token

  • Completion start time

Tokens

  • Input, output, and total token counts

  • Reasoning tokens (if applicable)

  • Cached tokens (if applicable)

  • Tokens per minute throughput

Cost

  • Input token cost

  • Output token cost

  • Total cost

  • Share of total trace cost (percentage)

Metadata

  • Trace ID and Transaction ID

  • Span ID (for OpenTelemetry correlation)

  • Operation subtype

  • Trace name and transaction name

Infrastructure

  • Environment and region

  • Credential alias

  • Middleware source

User Context

  • Subscriber email and ID

  • Organization

  • Product

  • Subscription ID


Filters

Time Range

Use the time range selector to focus on specific periods:

  • 7 Days: Last 7 days

  • 30 Days: Last 30 days

  • 90 Days: Last 90 days

  • Custom: Select a custom date range

Trace Type Filter

Filter the view to show only specific trace types. The dropdown lists all trace types present in your data during the selected time period.


Best Practices

Performance Optimization

  1. Monitor P95/P99 Metrics: Focus on tail latencies rather than averages—these represent your users' worst experiences

  2. Use the Timeline: The waterfall view helps identify which transactions are causing bottlenecks

  3. Compare Trace Types: Different workflow types may have different performance characteristics

  4. Track Trends: Watch for degradation over time using the trend indicators

Cost Management

  1. Review Cost Trends: Monitor daily and weekly patterns to understand normal spending

  2. Analyze by Model: Use the breakdown cards to see which models are driving costs

  3. Compare Providers: If using multiple providers, compare costs to optimize spend

  4. Understand Token Usage: Input vs output token costs can vary significantly—the token breakdown helps identify optimization opportunities

Setting Up Traces

To get the most value from Trace Analytics, ensure you're passing trace metadata in your AI transactions:

  • Trace ID: Use consistent trace IDs to group related transactions

  • Trace Type: Categorize workflows for meaningful aggregation

  • Task Type: Label operations for detailed analysis

  • Agent: Identify which agent or service processed the request



Support

For questions or issues with Trace Analytics, please contact support or refer to our Help Center.

Last updated

Was this helpful?