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.
git clone --depth 1 https://github.com/getsentry/sentry-for-ainpx agentmods add skills/getsentry/sentry-for-ai/sentry-setup-ai-monitoringWrote 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.
[](https://agentmods.dev/skills/getsentry/sentry-for-ai/sentry-setup-ai-monitoring)<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.
<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>- Socket pass
- Snyk pass
- NVIDIA SkillSpector warn
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.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.05451 |
| Opus 5.5 | $0.00029 | $0.02180 |
| Sonnet 5.5 | $0.00015 | $0.01090 |
| Haiku 4.5 | $0.00007 | $0.00545 |
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- sentry-setup-ai-monitoring — 100% identical, 2 lines differ
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:
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.
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.
- 12d ago Changed 208fc747d202
- 3mo ago First seen · 492 lines · 73 tokens per session scan A 8dfd0fecddd7
sentry-setup-ai-monitoring is a skill published in the GitHub repository getsentry/sentry-for-ai (283 stars, last pushed 4d ago), licensed MIT. It adds 73 tokens to every session and 5,451 once invoked, about $0.0003 per session on Opus 5.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.
sentry-setup-ai-monitoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| sentry-setup-ai-monitoringgetsentry/sentry-for-ai | Skill | 283 | 4d ago | MIT | A | 73 | Claude Code |
| security-modelgetsentry/skills | Skill | 1.2k | 16d ago | Apache-2.0 | A | 113 | Claude Code, Codex |
| django-perf-reviewgetsentry/skills | Skill | 1.2k | 16d ago | Apache-2.0 | A | 55 | Claude Code |
| gha-security-reviewgetsentry/skills | Skill | 1.2k | 16d ago | Apache-2.0 | A | 76 | Claude Code |
| presentation-creatorgetsentry/skills | Skill | 1.2k | 16d ago | Apache-2.0 | A | 73 | Claude Code |
| triage-frontend-issuesgetsentry/skills | Skill | 1.2k | 16d ago | Apache-2.0 | A | 93 | Claude Code |
| sred-project-organizergetsentry/skills | Skill | 1.2k | 16d ago | Apache-2.0 | A | 27 | Claude Code |