Sentry Instrumentation Guide
Decision framework for choosing between Sentry errors, spans, span attributes, logs, and metrics when instrumenting code.
- CCM score
- 75 of 100
- skills.sh installs
- 1.3K
- GitHub stars
- 283
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the four signals (errors, traces, logs, metrics), each mapped to the single question it answers
- Includes a gut-check decision table, four tiebreakers for overlapping cases, and a retention comparison for sampling versus filtering
- Enforces that logs and metrics are filtered rather than sampled, so rare failing requests are not lost
- Designed for developers and coding agents deciding what to emit; hands SDK setup off to the matching
sentry-*-sdkskills
Install
$ npx -y skills add getsentry/sentry-for-ai --skill sentry-instrumentation-guide -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
All Skills > Feature Setup > Instrumentation Guide
Sentry Instrumentation Guide: When to Reach for What
Errors, traces, logs, and metrics are the four kinds of telemetry most apps run on, and they overlap enough that the choice is rarely obvious. You can stuff context into a span attribute instead of logging it. You can count log lines instead of emitting a metric. You can add a duration to a log and call it a span.
But each signal exists because it answers a different question and feeds a different workflow once it lands. Reaching for the wrong one means the data is technically there but useless for the job you actually have later. This skill is the decision framework: given a value or an event in front of you, which signal should carry it, and why.
It decides what to emit. For how to turn each pillar on for a given stack, hand off to the
sentry-*-sdk skills and sentry-setup-ai-monitoring.
Invoke This Skill When
Details
- Repository
- github.com/getsentry/sentry-for-ai
- Categories
- Debugging, Technical Documentation, DevOps & Cloud
- First seen
- Jul 14, 2026
Questions
What is the sentry-instrumentation-guide skill for?
It is a decision framework that tells you which Sentry signal to use when instrumenting code: an error, a span, a span attribute, a log, or a metric. It decides what to emit, while the sentry SDK skills handle how to set each signal up.
Should I use a log, a span, or a metric for something in my code?
Use a log for the state at one decision point, a span for where time went in a request, and a metric for trends across all requests. The guide's tiebreakers cover the common overlaps between these signals.
How do I install the sentry-instrumentation-guide skill?
Run npx -y skills add getsentry/sentry-for-ai --skill sentry-instrumentation-guide -y in your project. The skill then lets your agent decide which Sentry signal to reach for when adding or reviewing instrumentation.
Where does this skill stand in the Debugging category?
It is listed in the Debugging category alongside diagnosing-bugs, azure-messaging, safe-debug, systematic-debugging, and sentry-cli. It focuses on choosing what telemetry to emit rather than on tracing a live bug.
Does this skill sample or filter logs and metrics?
Traces are sampled, errors are captured by default, and logs and metrics are not sampled but are filtered with before_send_log and before_send_metric. The skill explains this retention difference as part of choosing signals.
More from getsentry/sentry-for-ai
All 27- Sentry Fix Issues10.9K
- Sentry Create Alert4.5K
- Sentry React Native Sdk4.3K
- Sentry Nextjs Sdk3.8K
- Sentry Sdk Setup3.8K
- Sentry Cocoa Sdk3.7K
- Sentry Node Sdk3.5K
- Sentry React Sdk3.3K
- Sentry Sdk Upgrade3.2K
- Sentry Setup Ai Monitoring3.1K
- Sentry Browser Sdk3.1K
- Sentry Cloudflare Sdk2.8K
- Sentry Python Sdk2.7K
- Sentry Nestjs Sdk2.7K
- Sentry Sdk Skill Creator2.5K
- Sentry Otel Exporter Setup2.5K
- Sentry Android Sdk2.4K
- Sentry Dotnet Sdk2.4K
- Sentry Php Sdk2.4K
- Sentry Flutter Sdk2.3K
- Sentry Go Sdk2.3K
- Sentry Svelte Sdk2.3K
- Sentry Ruby Sdk2.2K
- Sentry Elixir Sdk2.1K
Similar to Sentry Instrumentation Guide
More Debuggingsentry-python-sdkSkillgetsentry/sentry-for-ai2.7K installsFull Sentry SDK setup for Python covering errors, tracing, profiling, logging, metrics, crons, and AI monitoring.
sentryPluginTheBushidoCollective/han201 starsBest practices and patterns for Sentry error monitoring and observability.
sentry-fix-issuesSkillgetsentry/sentry-agent-skills2.6K installsStructured workflow for triaging and fixing Sentry production errors through MCP, from discovery to verified code changes.
observability-and-instrumentationSkilladdyosmani/agent-skills72.5K installsInstrumentation guidance that makes production behavior visible and diagnosable, covering logs, metrics, and traces.
error-diagnostics-smart-debugSkillsickn33/agentic-awesome-skills356 installsStructured debugging workflow that diagnoses failures from traces, logs, and code, then verifies a scoped fix.