
Sentry Setup Ai Monitoring
This sets up Sentry's AI monitoring so you can track LLM calls, token usage, and agent execution across OpenAI, Anthropic, Vercel AI, LangChain, and others. It detects what AI SDKs you've already installed, configures the right integrations, and handles the tricky part about sampling rates (AI traces need to be sampled as complete trees or you lose visibility). The skill is opinionated about PII: it won't enable prompt and output recording without asking you first, which is smart since you're basically capturing user conversations. Works for both JavaScript and Python, with auto-instrumentation where available and manual span setup when you need it. Good if you want observability without reading through Sentry's docs to figure out which integration matches your stack.
- skills.sh installs
- 3K
- GitHub stars
- 277
- last updated
- Aug 21, 2026
Install
$ npx -y skills add getsentry/sentry-for-ai --skill sentry-setup-ai-monitoring --agent claude-codeInstalls into .claude/skills of the current project.
Files
All Skills > Feature Setup > AI Monitoring
Setup Sentry AI Agent Monitoring
Configure Sentry to track LLM calls, agent executions, tool usage, and token consumption.
Invoke This Skill When
- User asks to "monitor AI/LLM calls" or "track OpenAI/Anthropic usage"
- User wants "AI observability" or "agent monitoring"
- User asks about token usage, model latency, or AI costs
Important: The SDK versions, API names, and code samples below are examples. Always verify against docs.sentry.io before implementing, as APIs and minimum versions may have changed.
Prerequisites
AI monitoring requires tracing enabled (tracesSampleRate > 0).
If the app has multi-turn chats, set a conversation ID by default anywhere it makes sense to identify a chat session. Sentry uses gen_ai.conversation.id to group related AI spans into Conversations. Some integrations infer it automatically, but many setups need to set it explicitly.
Data Capture Warning
Sponsors
Details
- Repository
- github.com/getsentry/sentry-for-ai
- Categories
- DevOps & CI/CD, AI & Agent Building, Python, Cloud & Infrastructure, PHP & Laravel
- First seen
- Apr 16, 2026
More from getsentry/sentry-for-ai
All 31- Sentry Browser Sdk3K
- Sentry Feature Setup2.9K
- Sentry Cloudflare Sdk2.7K
- Sentry Python Sdk2.6K
- Sentry Nestjs Sdk2.6K
- Sentry Code Review2.5K
- Sentry Sdk Skill Creator2.5K
- Sentry Otel Exporter Setup2.5K
- Sentry Android Sdk2.4K
- Sentry Dotnet Sdk2.3K
- Sentry Php Sdk2.3K
- Sentry Flutter Sdk2.3K
- Sentry Pr Code Review2.3K
- Sentry Go Sdk2.3K
- Sentry Svelte Sdk2.2K
- Sentry Ruby Sdk2.2K
- Sentry Elixir Sdk2.1K
- Sentry Tanstack Start Sdk2K
- Sentry React Router Framework Sdk1.9K
- Sentry Instrumentation Guide1.2K
- Sentry Fix Issues10.4K
- Sentry Create Alert4.2K
- Sentry React Native Sdk4.2K
- Sentry Nextjs Sdk3.7K