sentry-setup-ai-monitoring

sentry-setup-ai-monitoring is a skill for Claude Code from getsentry/sentry-for-ai. It costs 73 tokens per session (5,454 once invoked), scanned A, original, MIT.

A setup guide for configuring Sentry to observe AI applications and agents. It covers tracking language-model calls, agent runs, tool use, conversations, token use, and related performance data.

In plain words
What is it for?
Use it with OpenAI, Anthropic, Vercel AI, LangChain, Google GenAI, Pydantic AI, or Laravel AI projects after enabling Sentry tracing.
Why use it?
It helps developers see what AI features are doing, including their usage, latency, and costs, while highlighting privacy considerations for captured prompts and responses.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is [All Skills](../../SKILL_TREE.md) > [Feature Setup](../sentry-feature-setup/SKILL.md) > AI Monitoring.

not rated 264repo +6 2d ago A scan Socket: passSnyk: passSkillSpector: warn 73 tokens original MIT

Good fit Use it with OpenAI, Anthropic, Vercel AI, LangChain, Google GenAI, Pydantic AI, or Laravel AI projects after enabling Sentry tracing.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/getsentry/sentry-for-ai
agentmods
npx agentmods add skills/getsentry/sentry-for-ai/sentry-setup-ai-monitoring

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sentry-setup-ai-monitoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/getsentry/sentry-for-ai/sentry-setup-ai-monitoring/github.svg)](https://agentmods.dev/skills/getsentry/sentry-for-ai/sentry-setup-ai-monitoring)
Your own site
<a href="https://agentmods.dev/skills/getsentry/sentry-for-ai/sentry-setup-ai-monitoring"><img src="https://agentmods.dev/badge/skills/getsentry/sentry-for-ai/sentry-setup-ai-monitoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sentry-setup-ai-monitoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/getsentry/sentry-for-ai/sentry-setup-ai-monitoring"><img src="https://agentmods.dev/badge/skills/getsentry/sentry-for-ai/sentry-setup-ai-monitoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,454 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 23 May 2026
  • Snyk pass 23 May 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 68
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.05454
Opus 5 $0.00036 $0.02727
Sonnet 5 $0.00015 $0.01091
Haiku 4.5 $0.00007 $0.00545

Measured 12d ago against content hash 8dfd0fecddd7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

sentry-setup-ai-monitoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills-legacy/sentry-setup-ai-monitoring/SKILL.md · 492 lines

How it starts

The opening of the file, as written. The whole thing — 492 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Prompt and output recording captures user content that is likely PII. In JavaScript, genAI input/output capture is on by default (governed by dataCollection.genAI); in Python it is enabled via send_default_pii=True; in Laravel it is enabled via SENTRY_SEND_DEFAULT_PII=true. Before relying on this capture (or per-integration overrides — recordInputs/recordOutputs in JS, include_prompts in Python), confirm:

  • The application's privacy policy permits capturing user prompts and model responses
  • Captured data complies with applicable regulations (GDPR, CCPA, etc.)
  • Sentry data retention settings are appropriate for the sensitivity of the data

Ask the user whether they want prompt/output capture enabled. Do not enable prompt/output capture without explicit confirmation. Use tracesSampleRate: 1.0 only in development; in production, use a lower value or a tracesSampler function.

Detection First

Always detect installed AI SDKs before configuring:

Read the full file on GitHub · 492 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 492 lines · 73 tokens per session scan A 8dfd0fecddd7

Subscribe to this mod's changes

sentry-setup-ai-monitoring is a skill published in the GitHub repository getsentry/sentry-for-ai (264 stars, last pushed 2d ago), licensed MIT. It adds 73 tokens to every session and 5,454 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

django-access-review

Django access control and IDOR security review. Use when reviewing Django views, DRF viewsets, ORM queries, or any Python/Django code handling user authorization. Trigger keywords: "IDOR", "access control", "authorization", "Django permissions", "object permissions", "tenant isolation", "broken access".

getsentry/skills · 69 tokens

django-perf-review

Django performance code review. Use when asked to "review Django performance", "find N+1 queries", "optimize Django", "check queryset performance", "database performance", "Django ORM issues", or audit Django code for performance problems.

getsentry/skills · 55 tokens

presentation-creator

Create data-driven presentation slides using React, Vite, and Recharts with Sentry branding. Use when asked to "create a presentation", "build slides", "make a deck", "create a data presentation", "build a Sentry presentation". Scaffolds a complete slide-based app with charts, animations, and single-file HTML output.

getsentry/skills · 73 tokens

gha-security-review

GitHub Actions security review for workflow exploitation vulnerabilities. Use when asked to "review GitHub Actions", "audit workflows", "check CI security", "GHA security", "workflow security review", or review .github/workflows/ for pwn requests, expression injection, credential theft, and supply chain attacks.…

getsentry/skills · 76 tokens

triage-frontend-issues

Triage new issues in the Sentry javascript project by archiving non-actionable noise. Use when asked to "triage issues", "triage the javascript project", "archive non-actionable issues", "triage new frontend issues", or "clean up the sentry/javascript queue". Operates only on the sentry/javascript project, only…

getsentry/skills · 93 tokens

pr-writer

Create or refresh reviewer-facing PR titles and descriptions. Use when opening a PR, updating its title or body, or preparing branch changes for review.

getsentry/skills · 33 tokens