Daniel Griesser e12b0145b4 feat(dotnet-sdk): add sentry-dotnet-sdk skill bundle (#19)
* feat(sentry-dotnet-sdk): add main SKILL.md wizard

Four-phase wizard covering the full .NET SDK setup journey:

Phase 1 (Detect): bash commands to scan for .csproj, framework type
(ASP.NET Core, WPF, WinForms, MAUI, Blazor WASM, Azure Functions,
classic ASP.NET), existing Sentry packages, and companion frontends.

Phase 2 (Recommend): opinionated feature matrix — Error Monitoring and
Tracing always, Logging when ILogger/Serilog/NLog detected, Profiling
and Crons as optional extras.

Phase 3 (Guide): Option 1 wizard (npx @sentry/wizard@latest -i dotnet),
Option 2 manual setup with complete working code for every major
framework (ASP.NET Core, WPF, WinForms, MAUI, Blazor WASM, Azure
Functions isolated worker, AWS Lambda, classic ASP.NET). Includes
MSBuild symbol upload setup for readable production stack traces.
Reference dispatch table points to references/*.md for each feature.

Phase 4 (Cross-Link): detects companion Next.js/React/Vue/Nuxt frontends
and suggests the matching SDK skill to enable distributed tracing.

Also includes:
- Full SentryOptions config reference table (all options, types, defaults, env vars)
- ASP.NET Core and MAUI extended options tables
- Environment variables table with double-underscore convention note
- MSBuild symbol upload properties table
- Troubleshooting table covering 10 common failure modes

* feat(sentry-dotnet-sdk): add error-monitoring.md deep-dive reference

Adds a comprehensive error monitoring reference for the .NET SDK at
skills/sentry-dotnet-sdk/references/error-monitoring.md, following the
same structure and depth as the Next.js exemplar.

Coverage:
- Automatic vs manual capture table with the core rule ('if you catch
  and don't re-throw, Sentry never sees it')
- Full CaptureException / CaptureMessage / CaptureEvent API with all
  overloads and inline scope callback semantics
- ASP.NET Core setup (Program.cs, appsettings.json, env vars), what is
  auto-captured, manual capture in controllers, custom ISentryUserFactory
- Scope management: ConfigureScope, PushScope/using pattern, inline
  configureScope callbacks, scope decision guide table
- Context enrichment: tags (with constraints), SentryUser fields,
  breadcrumbs (manual + auto sources), custom Contexts, tags vs
  contexts vs extra comparison table
- BeforeSend / BeforeSendTransaction / BeforeBreadcrumb / BeforeSendLog
  hooks with full signatures and practical examples
- Fingerprinting and custom grouping: collapse, split with {{ default }},
  template variable reference table
- Exception filters: AddExceptionFilterForType, IExceptionFilter,
  DeduplicateMode flags
- Unhandled exception capture for WPF (constructor requirement, global
  mode), MAUI (platform coverage table), WinForms (SetUnhandledExceptionMode
  requirement), Console (flush-on-exit note)
- Event processors: ISentryEventProcessor, ISentryEventExceptionProcessor,
  execution order, inline FuncEventProcessor
- User feedback: CaptureFeedback API, SentryFeedback object, crash-report
  modal (JS dialog) with ASP.NET Core integration
- Scenario coverage table, API quick reference, full SentryOptions
  reference table, 10-entry troubleshooting table

* feat(sentry-dotnet-sdk): add tracing.md deep-dive reference

Adds skills/sentry-dotnet-sdk/references/tracing.md — a comprehensive
reference covering all aspects of performance monitoring in the Sentry
.NET SDK, loaded on demand when the SKILL.md wizard reaches the tracing
phase.

Key topics covered:

- Activation model: TracesSampleRate / TracesSampler, both disabled by
  default; includes the TransactionSamplingContext shape and how to pass
  custom sampling hints at transaction start-time.

- ASP.NET Core middleware: UseSentry() placement requirement, what the
  SentryMiddleware does automatically (one transaction per request, route
  naming, error linking, ContinueTrace, IHttpClientFactory spans, EF Core
  spans), and how to drop/rename transactions via BeforeSendTransaction.

- Auto-instrumentation table: all integrations (ASP.NET Core, EF Core,
  SQLClient, Azure Functions Worker, Hangfire, Extensions.AI) with the
  three EF Core span types (db.query_compiler, db.connection, db.query)
  and the SentryHttpMessageHandler pattern for manual HttpClient usage.

- Custom instrumentation: minimal example, real-world checkout flow,
  attaching to an active transaction via GetSpan(), nested spans with
  SetData, IHub DI-friendly pattern, exception-aware Finish() mapping.

- Distributed tracing: sentry-trace + baggage header semantics, CORS
  warning, TracePropagationTargets, manual outgoing header injection,
  ContinueTrace() for incoming headers, and a full producer/consumer
  queue example showing trace linkage across service boundaries.

- OpenTelemetry: version requirements, SentrySpanProcessor mapping
  (first span → Transaction, children → child Spans), full dual-setup
  (AddSentry() in OTel builder + UseOpenTelemetry() in SentryOptions),
  and the critical warning against activity.RecordException() / AddException().

- Dynamic sampling: how DSC is propagated in baggage, why
  TransactionNameSource matters for grouping, table of all name source
  values with cardinality guidance.

- Operation types and Origin field naming conventions table.

- Custom measurements: SetMeasurement API, full MeasurementUnit
  reference table, unit consistency warning.

- SpanStatus reference with automatic exception and HTTP status mapping.

- Complete configuration reference with all key options in a table
  (TracesSampleRate, TracesSampler, TracePropagationTargets,
  SendDefaultPii, MaxSpans, ProfilesSampleRate, UseOpenTelemetry,
  DisableDiagnosticSourceIntegration).

- Quick reference cheat sheet for common one-liners.

- Troubleshooting table with 9 entries covering no-transaction,
  missing child spans, missing HTTP/EF Core spans, broken distributed
  traces, CORS issues, OTel misconfiguration, and high-cardinality names.

* feat(sentry-dotnet-sdk): add profiling.md deep-dive reference

Adds skills/sentry-dotnet-sdk/references/profiling.md — a comprehensive
reference for CPU profiling with the Sentry .NET SDK.

Covers:
- Minimum SDK version (Sentry.Profiling ≥ 4.0.0, .NET 8+ required)
- Installation via NuGet (and why iOS/Mac Catalyst don't need the package)
- How profiling attaches to transactions via ProfilesSampleRate ×
  TracesSampleRate compounding — one profiler per process at a time
- Three-step AddProfilingIntegration setup with ASP.NET Core and
  console/worker service examples
- Synchronous startup pattern (AddProfilingIntegration(TimeSpan)) to
  avoid missing early-startup transactions
- Platform matrix: Windows/Linux/macOS (EventPipe), iOS/Mac Catalyst
  (native Mono AOT), and unsupported platforms (.NET Framework, Android,
  Blazor WASM, Native AOT)
- Linux known issue (#4815, ReflectionTypeLoadException) with try/catch
  mitigation
- OTel + profiling conflict (#4820) and how to diagnose it
- All known limitations: 30-second cap, one-at-a-time constraint,
  unknown JIT frames, .NET 8+ requirement
- Config options table with types, defaults, and descriptions
- Production vs development recommended rates
- Troubleshooting table with 9 entries covering every common failure mode

* docs(sentry-dotnet-sdk): add logging.md deep-dive reference

Adds a comprehensive logging reference for the Sentry .NET SDK covering:

- Native SentrySdk.Logger API with all six severity levels (Trace through
  Fatal), attribute overloads, and supported attribute value types
- EnableLogs configuration requirement — clarifies the silent no-op behaviour
  without it and documents SetBeforeSendLog filtering with the full SentryLog
  object shape
- Automatically attached attributes table (trace/span IDs, user context,
  environment, release, message template parameters)
- Four third-party integrations with full working examples:
  • Microsoft.Extensions.Logging (ILogger) — ASP.NET Core, Generic Host,
    and direct ILoggerFactory setups; breadcrumb cascade behaviour; all
    config options
  • Serilog (Sentry.Serilog) — basic sink, separate SDK init, and
    ASP.NET Core UseSerilog patterns; config options table
  • NLog (Sentry.NLog) — code-based and XML (nlog.config) configs;
    prominent warning about minlevel needing to be lower than
    MinimumBreadcrumbLevel; all config options
  • log4net (Sentry.Log4Net) — XML appender and programmatic SDK init
    patterns; key appender options
- Log-to-trace correlation explanation (automatic via TraceId/SpanId on
  every log entry, no extra config needed)
- Log level mapping table across all four integrations
- SDK version matrix (native logger requires 5.14.0; integration packages
  4.x; native logs forwarded via integrations requires 6.1.0)
- Troubleshooting table with 9 entries covering the most common failure
  modes (missing EnableLogs, NLog minlevel pitfall, double SDK init,
  sensitive data, high volume filtering)

* docs(sentry-dotnet-sdk): add crons.md reference

Comprehensive deep-dive covering all cron monitoring capabilities in the
Sentry .NET SDK (≥ 4.2.0):

- CaptureCheckIn() API signature with all parameters
- CheckInStatus enum values (InProgress, Ok, Error)
- Two-signal check-in pattern (recommended) vs heartbeat pattern with
  optional duration reporting
- Programmatic monitor upsert via configureMonitorOptions: crontab and
  interval schedules, CheckInMargin, MaxRuntime, TimeZone,
  FailureIssueThreshold, RecoveryThreshold
- SentryMonitorInterval enum values
- Full monitor configuration reference table
- ASP.NET Core BackgroundService integration with complete production
  example (NightlyReportJob) and a minimal IHostedService/Timer pattern
- Hangfire integration via Sentry.Hangfire package
- Quartz.NET manual pattern (no official package)
- Long-running heartbeat loop pattern for continuously running processors
- Rate limit documentation (6 check-ins/min per monitor/environment)
- Alerting setup instructions
- SDK version matrix
- 8-entry troubleshooting table covering common failure modes

* docs(readme): add sentry-dotnet-sdk to available skills table

Add the sentry-dotnet-sdk skill entry to the SDK Skills table in README.md,
listing its supported frameworks (ASP.NET Core, MAUI, WPF, WinForms, Azure
Functions, Blazor, gRPC) and linking to the official .NET guide.

Also add four trigger phrases to the Quick Start section so users and AI
assistants can discover the skill when asking about .NET, ASP.NET Core,
MAUI/WPF/WinForms, or Azure Functions integration.

* fix(dotnet-sdk): correct API defaults and property casing from review

Address P1/P2 findings from code review, verified against sentry-dotnet
source code (github.com/getsentry/sentry-dotnet):

- CaptureFailedRequests default: false → true (error-monitoring.md)
- AttachStacktrace default: false → true (error-monitoring.md)
- MaxRequestBodySize thresholds: Small <4 KB, Medium <10 KB (error-monitoring.md)
- AttachStackTrace → AttachStacktrace casing in appsettings.json examples
  (both SKILL.md and error-monitoring.md)
2026-02-28 10:07:17 +01:00

Sentry Agent Skills

Official agent skills for integrating Sentry into your projects. These skills provide AI coding assistants with the knowledge to set up Sentry, debug production issues, and leverage Sentry's full observability platform.

Available Skills

SDK Skills (Full Platform Bundles)

Skill Description Platforms Docs
sentry-go-sdk Full Sentry setup wizard for Go — error monitoring, tracing, logging, metrics, crons Go (net/http, Gin, Echo, Fiber) Go Guide
sentry-python-sdk Full Sentry setup wizard for Python — error monitoring, tracing, profiling, logging, metrics, crons, AI monitoring Python (Django, Flask, FastAPI, Celery, Starlette, AIOHTTP) Python Guide
sentry-svelte-sdk Full Sentry setup wizard for Svelte/SvelteKit — error monitoring, tracing, session replay, logging Svelte, SvelteKit SvelteKit Guide
sentry-ruby-sdk Full Sentry setup wizard for Ruby — error monitoring, tracing, logging, Sidekiq metrics + dashboard, migration from AppSignal/Honeybadger Ruby, Rails, Sinatra, Rack, Sidekiq Ruby Guide
sentry-cocoa-sdk Full Sentry setup wizard for Apple platforms — error monitoring, tracing, profiling, session replay, logging iOS, macOS, tvOS, watchOS, visionOS (Swift, UIKit, SwiftUI) Apple Guide
sentry-react-native-sdk Full Sentry setup wizard for React Native and Expo — error monitoring, tracing, profiling, session replay, logging, native crash symbolication React Native, Expo managed/bare React Native Guide
sentry-react-sdk Full Sentry setup wizard for React — error monitoring, tracing, session replay, profiling, logging React 16+, React Router v5-v7, TanStack Router, Redux, Vite, webpack React Guide
sentry-nextjs-sdk Full Sentry setup wizard for Next.js — error monitoring, tracing, profiling, logging, session replay, AI monitoring, crons Next.js App Router + Pages Router, Vercel, @sentry/nextjs Next.js Guide
sentry-dotnet-sdk Full Sentry setup wizard for .NET — error monitoring, tracing, profiling, logging, crons ASP.NET Core, MAUI, WPF, WinForms, Azure Functions, Blazor, gRPC .NET Guide

Setup Skills

Skill Description Platforms Docs
sentry-setup-ai-monitoring Setup Sentry AI Agent Monitoring JS, Python AI Monitoring

Workflow Skills

Skill Description Requirements Docs
sentry-fix-issues Find and fix issues from Sentry using MCP Sentry MCP Issues
sentry-pr-code-review Review a project's PRs to check for issues detected in code review by Seer Bug Prediction GitHub CLI Seer
sentry-create-alert Create Sentry alerts using the workflow engine API curl, auth token Alerts

Authoring Skills

Skill Description Requirements
sentry-sdk-skill-creator Create a complete SDK skill bundle for any new platform — research, write, verify, and register Web search, claude tool

Installation

Install all skills using the skills CLI:

npx skills add https://github.com/getsentry/sentry-agent-skills

Or install a specific skill:

npx skills add https://github.com/getsentry/sentry-agent-skills --skill sentry-fix-issues

Browse available skills at skills.sh/getsentry/sentry-agent-skills.


Manual Installation

Choose your AI coding assistant below and run the appropriate command.


Claude Code

User-level (applies to all projects):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p ~/.claude/skills && \
  cp -r /tmp/sentry-skills/skills/* ~/.claude/skills/ && \
  rm -rf /tmp/sentry-skills

Project-level (single repository):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p .claude/skills && \
  cp -r /tmp/sentry-skills/skills/* .claude/skills/ && \
  rm -rf /tmp/sentry-skills
Directory structure
~/.claude/skills/              # User-level
.claude/skills/                # Project-level

# Each skill:
sentry-fix-issues/
  SKILL.md

OpenAI Codex

User-level (applies to all projects):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p ~/.codex/skills && \
  cp -r /tmp/sentry-skills/skills/* ~/.codex/skills/ && \
  rm -rf /tmp/sentry-skills

Project-level (single repository):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p .codex/skills && \
  cp -r /tmp/sentry-skills/skills/* .codex/skills/ && \
  rm -rf /tmp/sentry-skills
Directory structure
~/.codex/skills/               # User-level
.codex/skills/                 # Project-level

# Each skill:
sentry-fix-issues/
  SKILL.md

GitHub Copilot

User-level (applies to all projects):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p ~/.copilot/skills && \
  cp -r /tmp/sentry-skills/skills/* ~/.copilot/skills/ && \
  rm -rf /tmp/sentry-skills

Project-level (single repository):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p .github/skills && \
  cp -r /tmp/sentry-skills/skills/* .github/skills/ && \
  rm -rf /tmp/sentry-skills
Directory structure
~/.copilot/skills/             # User-level
.github/skills/                # Project-level

# Each skill:
sentry-fix-issues/
  SKILL.md

Cursor

Note: Agent skills require Cursor Nightly. Enable via: Cursor Settings > Rules > Import Settings > Agent Skills

User-level (applies to all projects):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p ~/.cursor/skills && \
  cp -r /tmp/sentry-skills/skills/* ~/.cursor/skills/ && \
  rm -rf /tmp/sentry-skills

Project-level (single repository):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p .cursor/skills && \
  cp -r /tmp/sentry-skills/skills/* .cursor/skills/ && \
  rm -rf /tmp/sentry-skills
Directory structure
~/.cursor/skills/              # User-level
.cursor/skills/                # Project-level

# Each skill:
sentry-fix-issues/
  SKILL.md

OpenCode

User-level (applies to all projects):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p ~/.config/opencode/skill && \
  cp -r /tmp/sentry-skills/skills/* ~/.config/opencode/skill/ && \
  rm -rf /tmp/sentry-skills

Project-level (single repository):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p .opencode/skill && \
  cp -r /tmp/sentry-skills/skills/* .opencode/skill/ && \
  rm -rf /tmp/sentry-skills
Directory structure
~/.config/opencode/skill/      # User-level
.opencode/skill/               # Project-level

# Also supports Claude-compatible paths:
~/.claude/skills/              # User-level (alternative)
.claude/skills/                # Project-level (alternative)

# Each skill:
sentry-fix-issues/
  SKILL.md

AmpCode (Sourcegraph Amp)

User-level (applies to all projects):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p ~/.config/agents/skills && \
  cp -r /tmp/sentry-skills/skills/* ~/.config/agents/skills/ && \
  rm -rf /tmp/sentry-skills

Project-level (single repository):

git clone https://github.com/getsentry/sentry-agent-skills.git /tmp/sentry-skills && \
  mkdir -p .agents/skills && \
  cp -r /tmp/sentry-skills/skills/* .agents/skills/ && \
  rm -rf /tmp/sentry-skills
Directory structure
~/.config/agents/skills/       # User-level
.agents/skills/                # Project-level

# Also supports Claude-compatible paths:
~/.claude/skills/              # User-level (alternative)
.claude/skills/                # Project-level (alternative)

# Each skill:
sentry-fix-issues/
  SKILL.md

Quick Reference

Client User-Level Path Project-Level Path
Claude Code ~/.claude/skills/ .claude/skills/
Codex ~/.codex/skills/ .codex/skills/
Copilot ~/.copilot/skills/ .github/skills/
Cursor ~/.cursor/skills/ .cursor/skills/
OpenCode ~/.config/opencode/skill/ .opencode/skill/
AmpCode ~/.config/agents/skills/ .agents/skills/

Usage

Once installed, your AI assistant will automatically discover the skills. Simply ask:

SDK Skills (Full Platform Bundles)

What to Say Skill Used
"Add Sentry to my Go app" sentry-go-sdk
"Set up Sentry in my Gin/Echo/Fiber project" sentry-go-sdk
"Add Sentry to my Python app" sentry-python-sdk
"Set up Sentry in my Django/Flask/FastAPI project" sentry-python-sdk
"Monitor my OpenAI/LangChain calls in Python" sentry-python-sdk
"Add Sentry to my SvelteKit app" sentry-svelte-sdk
"Set up Sentry in Svelte" sentry-svelte-sdk
"Add Sentry to my Ruby/Rails app" sentry-ruby-sdk
"Set up Sentry metrics for Puma/Sidekiq" sentry-ruby-sdk
"Migrate from AppSignal to Sentry" sentry-ruby-sdk
"Replace Honeybadger with Sentry" sentry-ruby-sdk
"Add Sentry to my iOS app" sentry-cocoa-sdk
"Set up Sentry in my Swift/SwiftUI project" sentry-cocoa-sdk
"Add Sentry to my macOS app" sentry-cocoa-sdk
"Add Sentry to my React Native app" sentry-react-native-sdk
"Set up Sentry in Expo" sentry-react-native-sdk
"Configure session replay for React Native" sentry-react-native-sdk
"Add Sentry to my React app" sentry-react-sdk
"Set up error boundaries in React" sentry-react-sdk
"Configure session replay for React" sentry-react-sdk
"Add Sentry to my Next.js app" sentry-nextjs-sdk
"Set up Sentry in Next.js App Router" sentry-nextjs-sdk
"Monitor AI/OpenAI calls in Next.js" sentry-nextjs-sdk
"Add Sentry to my .NET app" sentry-dotnet-sdk
"Set up Sentry in my ASP.NET Core project" sentry-dotnet-sdk
"Add Sentry to my MAUI/WPF/WinForms app" sentry-dotnet-sdk
"Monitor Azure Functions with Sentry" sentry-dotnet-sdk

Setup

What to Say Skill Used
"Add Sentry to my iOS/Swift app" sentry-cocoa-sdk
"Monitor my OpenAI/LangChain calls" sentry-setup-ai-monitoring

Debugging & Workflow

What to Say Skill Used
"Fix the recent Sentry errors" sentry-fix-issues
"Debug the production TypeError" sentry-fix-issues
"Work through my Sentry backlog" sentry-fix-issues
"Review Sentry comments on PR #123" sentry-pr-code-review
"Fix the issues Sentry found in my PR" sentry-pr-code-review
"Create an alert that emails me when a high priority issue de-escalates" sentry-create-alert
"Set up a Slack notification for new Sentry issues" sentry-create-alert
/sentry-create-alert sentry-create-alert

The assistant will load the appropriate skill and guide you through the process.


Skill Format

These skills follow the Agent Skills specification. Each skill contains:

skill-name/
  SKILL.md        # Required: YAML frontmatter + markdown instructions

SKILL.md structure:

---
name: skill-name
description: Description of what this skill does and when to use it
---

# Skill Title

Instructions for the AI assistant...

SDK skill bundles use a references/ directory for feature-specific deep dives:

sentry-go-sdk/
  SKILL.md           # Main wizard
  references/
    error-monitoring.md
    tracing.md
    ...

Contributing

Contributions are welcome! Please ensure any new skills:

  1. Follow the Agent Skills specification
  2. Have a valid name (lowercase letters, numbers, hyphens, 1-64 chars, no consecutive hyphens, must not start or end with hyphen)
  3. Include a clear description (1-1024 chars)
  4. Include an "Invoke This Skill When" section with trigger phrases
  5. Verify technical details against Sentry docs

For full-platform SDK skills (covering all Sentry features for one language/framework), see docs/sdk-skill-philosophy.md for the bundle architecture pattern.

Style Guidelines

  • Prefer tables over paragraphs for reference information
  • Use phases/steps for multi-stage workflows
  • Include version requirements where applicable
  • Add troubleshooting tables for common issues
  • SDK skill bundles should be comprehensive — use references/ directories for deep-dive content loaded on demand

License

Apache-2.0

S
Description
Find and fix issues from Sentry using MCP. Use when asked to fix Sentry errors, debug production issues, investigate exceptions, or resolve bugs reported in…
Readme 729 KiB
Languages
Shell 100%