getsentry/sentry-for-ai/sentry-go-sdk
Claude Code and agent skill by getsentry/sentry-for-ai
- community
Checking that the SKILL.md file is still in the repository.
Full Sentry SDK setup for Go. Use when asked to "add Sentry to Go", "install sentry-go", "setup Sentry in Go", or configure error monitoring, tracing, logging, metrics, or crons for Go applications. Supports net/http, Gin, Echo, Fiber, FastHTTP, Iris, Negroni, and gRPC.
Install
npx vskill@latest install getsentry/sentry-for-ai/sentry-go-sdkSKILL.md
The same SKILL.md was published earlier as getsentry/sentry-for-ai/sentry-go-sdk.
All Skills > SDK Setup > Go SDK
Sentry Go SDK
Opinionated wizard that scans your Go project and guides you through complete Sentry setup.
Invoke This Skill When
- User asks to "add Sentry to Go" or "setup Sentry" in a Go app
- User wants error monitoring, tracing, logging, metrics, or crons in Go
- User mentions
sentry-go,github.com/getsentry/sentry-go, or Go Sentry SDK - User wants to monitor panics, HTTP handlers, or scheduled jobs in Go
Note: SDK versions and APIs below reflect Sentry docs at time of writing (sentry-go v0.43.0+).As of v0.33.0+, the SDK requires Go 1.25 or later (supports the two most recent Go major versions).Always verify against docs.sentry.io/platforms/go/ before implementing.
Phase 1: Detect
Run these commands to understand the project before making any recommendations:
What to note:
- Is
sentry-goalready ingo.mod? If yes, skip to Phase 2 (configure features). - Which framework is used? (Determines which sub-package and middleware to install.)
- Which logging library? (Enables automatic log capture.)
- Are cron/scheduler patterns present? (Triggers Crons recommendation.)
- Is there a companion frontend directory? (Triggers Phase 4 cross-link.)
Phase 2: Recommend
Based on what you found, present a concrete recommendation. Don't ask open-ended questions — lead with a proposal:
Recommended (core coverage):
- ✅ Error Monitoring — always; captures panics and unhandled errors
- ✅ Tracing — if HTTP handlers, gRPC, or DB calls are detected
- ✅ Logging — if logrus, zap, zerolog, or slog is detected
Optional (enhanced observability):
- ⚡ Metrics — custom counters and gauges for business KPIs / SLOs
- ⚡ Crons — detect silent failures in scheduled jobs
- ⚠️ Profiling — removed in sentry-go v0.31.0; see
references/profiling.mdfor alternatives
Recommendation logic:
| Feature | Recommend when... | |
|---|---|---|
| Error Monitoring | Always — non-negotiable baseline | |
| Tracing | net/http, gin, echo, fiber, gRPC, or DB calls detected | |
| Logging | logrus, zap, zerolog, or log/slog imports detected | |
| Metrics | Business events, SLO tracking, or counters needed | |
| Crons | robfig/cron, gocron, or scheduled job patterns detected | |
| Profiling | ⚠️ Removed in v0.31.0 — do not recommend; see references/profiling.md |
Propose: "I recommend setting up Error Monitoring + Tracing [+ Logging if applicable]. Want me to also add Metrics or Crons?"
Phase 3: Guide
Install
Quick Start — Recommended Init
Add to main() before any other code. This config enables the most features with sensible defaults:
Injecting `Release` at build time (recommended):
Framework Middleware
After sentry.Init, register the Sentry middleware for your framework:
| Framework | Import path | Middleware call | Repanic | WaitForDelivery | |
|---|---|---|---|---|---|
net/http | .../sentry-go/http | sentryhttp.New(opts).Handle(h) | true | false | |
| Gin | .../sentry-go/gin | router.Use(sentrygin.New(opts)) | true | false | |
| Echo | .../sentry-go/echo | e.Use(sentryecho.New(opts)) | true | false | |
| Fiber | .../sentry-go/fiber | app.Use(sentryfiber.New(opts)) | false | true | |
| FastHTTP | .../sentry-go/fasthttp | sentryfasthttp.New(opts).Handle(h) | false | true | |
| Iris | .../sentry-go/iris | app.Use(sentryiris.New(opts)) | true | false | |
| Negroni | .../sentry-go/negroni | n.Use(sentrynegroni.New(opts)) | true | false |
Note: Fiber and FastHTTP are built onvalyala/fasthttpwhich has no built-in recovery. UseRepanic: false, WaitForDelivery: truefor those.
Hub access in handlers:
gRPC Integration
For gRPC servers and clients, use the sentrygrpc interceptors instead:
For Each Agreed Feature
Walk through features one at a time. Load the reference file for each, follow its steps, and verify before moving to the next:
| Feature | Reference file | Load when... | |
|---|---|---|---|
| Error Monitoring | ${SKILL_ROOT}/references/error-monitoring.md | Always (baseline) | |
| Tracing | ${SKILL_ROOT}/references/tracing.md | HTTP handlers / distributed tracing | |
| Profiling | ${SKILL_ROOT}/references/profiling.md | Performance-sensitive production apps | |
| Logging | ${SKILL_ROOT}/references/logging.md | logrus / zap / zerolog / slog detected | |
| Metrics | ${SKILL_ROOT}/references/metrics.md | Business KPIs / SLO tracking | |
| Crons | ${SKILL_ROOT}/references/crons.md | Scheduler / cron job patterns detected |
For each feature: Read ${SKILL_ROOT}/references/<feature>.md, follow steps exactly, verify it works.
Configuration Reference
Key ClientOptions Fields
| Option | Type | Default | Purpose | |
|---|---|---|---|---|
Dsn | string | "" | SDK disabled if empty; env: SENTRY_DSN | |
Environment | string | "" | e.g., "production"; env: SENTRY_ENVIRONMENT | |
Release | string | "" | e.g., "my-app@1.0.0"; env: SENTRY_RELEASE | |
SendDefaultPII | bool | false | Include IP, request headers | |
AttachStacktrace | bool | false | Stack traces on CaptureMessage calls | |
SampleRate | float64 | 1.0 | Error event sample rate (0.0 treated as 1.0) | |
EnableTracing | bool | false | Enable performance tracing | |
TracesSampleRate | float64 | 0.0 | Transaction sample rate | |
TracesSampler | TracesSampler | nil | Custom per-transaction sampling (overrides rate) | |
EnableLogs | bool | false | Enable Sentry Logs feature | |
MaxBreadcrumbs | int | 100 | Max breadcrumbs per event | |
MaxErrorDepth | int | 100 | Max depth for unwrapping error chains | |
Debug | bool | false | Verbose SDK debug output | |
BeforeSend | func | nil | Hook to mutate/drop error events | |
BeforeSendTransaction | func | nil | Hook to mutate/drop transaction events | |
IgnoreErrors | []string | nil | Regex patterns for errors to drop | |
IgnoreTransactions | []string | nil | Regex patterns for transactions to drop |
Environment Variables
| Variable | Maps to | Purpose | |
|---|---|---|---|
SENTRY_DSN | Dsn | Data Source Name | |
SENTRY_RELEASE | Release | App version (e.g., my-app@1.0.0) | |
SENTRY_ENVIRONMENT | Environment | Deployment environment | |
HTTP_PROXY / HTTPS_PROXY | HTTPProxy / HTTPSProxy | Outbound proxy |
Options set in ClientOptions override environment variables.
Verification
Test that Sentry is receiving events:
Check the Sentry dashboard within a few seconds. If nothing appears:
- Set
Debug: trueinClientOptions— prints SDK internals to stdout - Verify the DSN is correct and the project exists
- Ensure
sentry.Flush(2 * time.Second)is called (events are async by default)
Phase 4: Cross-Link
After completing Go setup, check for a companion frontend missing Sentry coverage:
If a frontend directory exists without Sentry configured, suggest the matching skill:
| Frontend detected | Suggest skill | |
|---|---|---|
| React / Next.js | sentry-react-sdk | |
| Svelte / SvelteKit | sentry-svelte-sdk | |
| Vue | Use @sentry/vue — see docs.sentry.io/platforms/javascript/guides/vue/ | |
| Other JS/TS | sentry-react-sdk (covers generic browser JS patterns) |
Troubleshooting
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills-legacy/sentry-go-sdk/SKILL.md
Popularity
- Repository stars
- 253
- Repository forks
- 30
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 12 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/getsentry/sentry-for-ai/sentry-go-sdk)