Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/ai/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords:
- MCP
- Model Context Protocol
- agent plugin
- AI monitoring
- AI observability
- vibe coding
- Claude
- Cursor
Expand Down Expand Up @@ -45,9 +45,9 @@ keywords:
className="w-full md:w-[calc(50%-12px)]"
/>
<LinkCard
href="/ai/monitoring/"
href="/ai/observability/"
iconSrc="/ai/img/IconStats.svg"
title="AI Monitoring"
title="AI Observability"
description="Add Sentry monitoring and debugging to your AI agents and MCP servers. Track LLM calls, token usage, and tool executions."
className="w-full md:w-[calc(50%-12px)]"
/>
Expand Down
43 changes: 0 additions & 43 deletions docs/ai/monitoring/agents/getting-started.mdx

This file was deleted.

34 changes: 0 additions & 34 deletions docs/ai/monitoring/agents/index.mdx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_order: 15
description: Learn how Sentry calculates AI model costs, where pricing data comes from, and what's not covered.
---

The **Model Cost** widget in the [AI Agents Dashboard](/ai/monitoring/agents/dashboards/) Models tab shows estimated costs for your LLM usage. This page explains how those costs are calculated.
The **Model Cost** widget in the [AI Agents Dashboard](/ai/observability/agents/dashboards/) Models tab shows estimated costs for your LLM usage. This page explains how those costs are calculated.

## Data Sources

Expand Down Expand Up @@ -67,5 +67,5 @@ Cost estimates only account for **token-based pricing**. The following are **not
If you're using manual instrumentation and your costs look unexpected (for example, negative costs), the most common cause is incorrectly set token attributes. See the "Token Usage and Cost Gotchas" section on the manual instrumentation page for your platform:

- [Python](/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module/#token-usage-and-cost-gotchas)
- [JavaScript](/platforms/javascript/guides/node/ai-agent-monitoring/#token-usage-and-cost-gotchas)
- [JavaScript](/platforms/javascript/guides/node/agent-tracing/#token-usage-and-cost-gotchas)
- [Ruby](/platforms/ruby/tracing/instrumentation/custom-instrumentation/ai-agents-module/#token-usage-and-cost-gotchas)
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ keywords:
og_image: /og-images/ai-monitoring-agents-dashboard.png
---

The AI Agents [Dashboards](https://sentry.io/orgredirect/organizations/:orgslug/dashboards/?filter=onlyPrebuilt&query=agents&sort=mostPopular) provide a comprehensive view of your AI workflows, including executions, model costs and token usage, tool calls, and recent errors. Once you've [configured the Sentry SDK](/ai/monitoring/agents/getting-started/) for your AI agent project, telemetry data is collected and displayed in the dashboard to support analysis of system behavior and performance.
The AI Agents [Dashboards](https://sentry.io/orgredirect/organizations/:orgslug/dashboards/?filter=onlyPrebuilt&query=agents&sort=mostPopular) provide a comprehensive view of your AI workflows, including executions, model costs and token usage, tool calls, and recent errors. Once you've [configured the Sentry SDK](/ai/observability/agents/getting-started/) for your AI agent project, telemetry data is collected and displayed in the dashboard to support analysis of system behavior and performance.

AI Agent monitoring have three dashboards:
Agent tracing have three dashboards:

- [Overview](#overview)
- [Models](#models)
Expand Down
43 changes: 43 additions & 0 deletions docs/ai/observability/agents/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Set Up
sidebar_order: 0
description: "Learn how to set up Sentry Agent Tracing"
keywords:
- AI agent setup
- agent tracing setup
- OpenAI integration
- Anthropic integration
- LangChain integration
- Python AI
- Node.js AI
- React AI
- JavaScript AI
- React Native AI
- Next.js AI
- .NET AI
- dotnet AI
---

Sentry Agent Tracing helps you track and debug AI agent applications using our supported SDKs and integrations. Monitor your complete agent workflows from user interaction to final response, including tool calls, model interactions, and custom logic.

To use [Conversations](/ai/observability/conversations/), set a conversation ID for each chat. Sentry uses the `gen_ai.conversation.id` attribute to group related AI spans, and some SDK integrations set it automatically.

To start sending AI agent data to Sentry, make sure you've created a Sentry project for your AI-enabled repository and follow one of the guides below:

- [Python](/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module)
- [Laravel](/platforms/php/guides/laravel/agent-tracing/)
- [Node.js](/platforms/javascript/guides/node/agent-tracing/)
- [Browser (JavaScript)](/platforms/javascript/agent-tracing-browser/)
- [React](/platforms/javascript/guides/react/agent-tracing-browser/)
- [React Native](/platforms/react-native/agent-tracing/)
- [Next.js](/platforms/javascript/guides/nextjs/agent-tracing/)
- [.NET](/platforms/dotnet/tracing/instrumentation/ai-agents-module/)
- [Ruby](/platforms/ruby/tracing/instrumentation/custom-instrumentation/ai-agents-module/)

After setting up, [name your agents](/ai/observability/agents/naming/) so they appear as identifiable entries in the AI Agents dashboard.

<Alert title="Don't see your runtime?">

You can also instrument AI agents manually by following our [manual instrumentation guides](/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module).

</Alert>
34 changes: 34 additions & 0 deletions docs/ai/observability/agents/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: AI Agents
sidebar_order: 10
description: >-
Learn how to use Sentry's Agent tracing tools to trace and debug your AI
agent workflows, including agent runs, tool calls, and model interactions.
keywords:
- AI agents
- LLM monitoring
- agent tracing
- tool calls
- OpenAI
- Anthropic
- LangChain
- token usage
- agent tracing
og_image: /og-images/ai-monitoring-agents.png
---

Sentry's Agent tracing tools help you understand what's going on with your AI agent workflows. They automatically collect information about agent runs, tool calls, model interactions, and errors across your entire AI pipeline—from user interaction to final response.

## Example Agent Tracing Use Cases

- Your AI agent is failing silently during tool execution, and you want to trace the complete agent flow to identify where it's breaking.
- Users report that your AI agent is returning unexpected or malformed responses, and you need to debug the full context of prompts, model calls, and outputs.
- Your AI agent workflows are experiencing performance issues, and you want to identify which steps (model calls, tool usage, or custom logic) are causing bottlenecks.

## Get Started

To use Agent Tracing, you must have an existing Sentry account and project set up. If you don't have one, [create an account here](https://sentry.io/signup/).

![Agents Tracing Overview](./img/overview.png)

Learn how to [set up Sentry for AI Agents](/ai/observability/agents/getting-started/) and [name your agents](/ai/observability/agents/naming/) so they're identifiable in the dashboard.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ keywords:
- AI agents
- agent name
- gen_ai.agent.name
- agent monitoring
- agent tracing
- agent identification
---

Sentry uses the `gen_ai.agent.name` span attribute to identify agents in the [AI Agents Dashboard](/ai/monitoring/agents/dashboards/). Without a name, you won't be able to filter for a specific agent, group results by agent, or set up alerts for individual agents.
Sentry uses the `gen_ai.agent.name` span attribute to identify agents in the [AI Agents Dashboard](/ai/observability/agents/dashboards/). Without a name, you won't be able to filter for a specific agent, group results by agent, or set up alerts for individual agents.

## Quick Reference

Expand Down Expand Up @@ -219,7 +219,7 @@ const agent = new Agent({
});
```

<PlatformLink platform="javascript.node" to="/ai-agent-monitoring/mastra/">
<PlatformLink platform="javascript.node" to="/agent-tracing/mastra/">
Mastra integration docs
</PlatformLink>

Expand Down Expand Up @@ -285,10 +285,10 @@ await Sentry.startSpan(
);
```

See [JavaScript manual instrumentation](/platforms/javascript/guides/node/ai-agent-monitoring/#invoke-agent-span) for full span attributes.
See [JavaScript manual instrumentation](/platforms/javascript/guides/node/agent-tracing/#invoke-agent-span) for full span attributes.

## Next Steps

- [AI Agents Dashboard](/ai/monitoring/agents/dashboards/) — view and filter agents by name
- [Data Privacy](/ai/monitoring/agents/privacy/) — control what data is sent to Sentry
- [Model Costs](/ai/monitoring/agents/costs/) — track token usage and estimated costs
- [AI Agents Dashboard](/ai/observability/agents/dashboards/) — view and filter agents by name
- [Data Privacy](/ai/observability/agents/privacy/) — control what data is sent to Sentry
- [Model Costs](/ai/observability/agents/costs/) — track token usage and estimated costs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Data Privacy
sidebar_order: 20
description: >-
Learn how to control data collection and protect sensitive information in AI
agent monitoring.
agent tracing.
keywords:
- AI privacy
- PII
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,6 @@ sentry_sdk.logger.info(

## Next Steps

- [Getting Started](/ai/monitoring/agents/getting-started/)
- [Model Costs](/ai/monitoring/agents/costs/)
- [AI Agents Dashboard](/ai/monitoring/agents/dashboards/)
- [Getting Started](/ai/observability/agents/getting-started/)
- [Model Costs](/ai/observability/agents/costs/)
- [AI Agents Dashboard](/ai/observability/agents/dashboards/)
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ You can find it in **Explore > Conversations** in the Sentry sidebar.

## Prerequisites

Conversations are built on top of [AI Agent Monitoring](/ai/monitoring/agents/). Before you can use them, you need:
Conversations are built on top of [Agent Tracing](/ai/observability/agents/). Before you can use them, you need:

1. **Tracing enabled** with the Sentry SDK configured for your AI agent project. Follow the [Agent Monitoring getting started guide](/ai/monitoring/agents/getting-started/) if you haven't already.
1. **Tracing enabled** with the Sentry SDK configured for your AI agent project. Follow the [Agent Tracing getting started guide](/ai/observability/agents/getting-started/) if you haven't already.

2. **A conversation ID on your spans.** Sentry groups spans into conversations using the `gen_ai.conversation.id` attribute. You can set this manually, or some SDK integrations infer it automatically.

## Conversation ID

A conversation is a collection of spans that share the same `gen_ai.conversation.id`. This is typically the ID of the chat session in your application (for example, the session ID you store in your database).

Some SDK integrations (such as OpenAI Agents SDK for Python and OpenAI SDK for Node) automatically infer the conversation ID. For all other integrations, you need to set it manually. See your platform's AI agent monitoring guide for setup instructions:
Some SDK integrations (such as OpenAI Agents SDK for Python and OpenAI SDK for Node) automatically infer the conversation ID. For all other integrations, you need to set it manually. See your platform's Agent tracing guide for setup instructions:

- [JavaScript/Node](/platforms/javascript/guides/node/ai-agent-monitoring/#tracking-conversations)
- [JavaScript/Node](/platforms/javascript/guides/node/agent-tracing/#tracking-conversations)
- [Python](/platforms/python/tracing/instrumentation/custom-instrumentation/ai-agents-module/#tracking-conversations)
- [Laravel](/platforms/php/guides/laravel/ai-monitoring/#conversations)
- [Laravel](/platforms/php/guides/laravel/agent-tracing/#conversations)

### Choosing a Conversation ID

Expand Down
14 changes: 7 additions & 7 deletions docs/ai/monitoring/index.mdx → docs/ai/observability/index.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: AI Monitoring
title: AI Observability
sidebar_order: 30
description: "Monitor your AI agents and MCP servers in production with Sentry. Track LLM calls, token usage, tool executions, and agent handoffs."
keywords:
- AI monitoring
- AI observability
- LLM monitoring
- agent monitoring
- agent tracing
- MCP monitoring
- token usage
- AI observability
Expand All @@ -16,21 +16,21 @@ Sentry provides comprehensive monitoring for your AI implementations. Whether yo

<LinkCardGrid>
<LinkCard
href="/ai/monitoring/agents/"
href="/ai/observability/agents/"
iconSrc="/ai/img/IconBot.svg"
title="AI Agent Monitoring"
title="Agent Tracing"
description="Monitor AI agent workflows including agent runs, tool calls, model interactions, and handoffs."
className="w-full md:w-[calc(50%-12px)]"
/>
<LinkCard
href="/ai/monitoring/conversations/"
href="/ai/observability/conversations/"
iconSrc="/ai/img/IconCompass.svg"
title="Conversations"
description="Replay past conversations with your AI assistants. See every message and tool call in a chat-like view."
className="w-full md:w-[calc(50%-12px)]"
/>
<LinkCard
href="/ai/monitoring/mcp/"
href="/ai/observability/mcp/"
iconSrc="/ai/img/IconCode.svg"
title="MCP Monitoring"
description="Trace and debug your MCP server implementations. Monitor tool executions, resource access, and client connections."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords:
og_image: /og-images/ai-monitoring-mcp-dashboard.png
---

Once you've [configured the Sentry SDK](/ai/monitoring/mcp/getting-started/) for your MCP project, you'll start receiving data in the [MCP Dashboards](https://sentry.io/orgredirect/organizations/:orgslug/dashboards/?filter=onlyPrebuilt&query=mcp&sort=mostPopular).
Once you've [configured the Sentry SDK](/ai/observability/mcp/getting-started/) for your MCP project, you'll start receiving data in the [MCP Dashboards](https://sentry.io/orgredirect/organizations/:orgslug/dashboards/?filter=onlyPrebuilt&query=mcp&sort=mostPopular).

The main dashboard provides a comprehensive view of all your MCP server activities, performance metrics, and recent tool executions.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ To use MCP Monitoring, you must have an existing Sentry account and project set

![MCP Monitoring Overview](./img/overview-tab.png)

Learn how to [set up Sentry for MCP Monitoring](/ai/monitoring/mcp/getting-started/).
Learn how to [set up Sentry for MCP Monitoring](/ai/observability/mcp/getting-started/).
2 changes: 1 addition & 1 deletion docs/guides/custom-spans.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ fun processEmailDigest(job: Job) {

### 5. AI/LLM Operations

For AI workloads, use [Sentry Agent Monitoring](/ai/monitoring/agents/) instead of manual instrumentation when possible. It automatically captures agent workflows, tool calls, and token usage.
For AI workloads, use [Sentry Agent Tracing](/ai/observability/agents/) instead of manual instrumentation when possible. It automatically captures agent workflows, tool calls, and token usage.

If you're not using a supported framework or need custom attributes:

Expand Down
Loading
Loading