getsentry avatar

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-code

Installs 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
1replicate avatarbuild-modelsreplicate/skillsPackage and build custom AI models with Cog for deployment on Replicate. Use when creating a cog.yaml or predict.py, defining model inputs and outputs, loading 2Kskills.sh installs
2github avatarflowstudio-power-automate-buildgithub/awesome-copilotBuild, scaffold, and deploy Power Automate cloud flows using the FlowStudio MCP server. Your agent constructs flow definitions, wires connections, deploys, and 1.9Kskills.sh installs
3github avatarsandbox-npm-installgithub/awesome-copilotInstall npm packages in a Docker sandbox environment. Use this skill whenever you need to install, reinstall, or update node_modules inside a container where th1.7Kskills.sh installs
4lukasniessen avatarkubernetes-skilllukasniessen/kubernetes-skillPrevent Kubernetes hallucinations by diagnosing and fixing failure modes: insecure workload defaults, resource starvation, network exposure, privilege sprawl, f1.5Kskills.sh installs
5mindrally avatarkubernetesmindrally/skillsExpert in Kubernetes and DevOps with infrastructure-as-code and cloud-native patterns1.1Kskills.sh installs
6orchestra-research avatarlangsmith-observabilityorchestra-research/ai-research-skillsLLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring p1Kskills.sh installs