Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

sentry-dotnet-sdk

БесплатноБез исполняемых скриптовНе проверен

Full Sentry SDK setup for .NET. Use when asked to "add Sentry to .NET", "install Sentry for C#", or configure error monitoring, tracing, profiling, logging…

getsentryот getsentry★ 25 звёзд на GitHub

Об этом скилле

Sentry .NET SDK

Opinionated wizard that scans your .NET project and guides you through complete Sentry setup: error monitoring, distributed tracing, profiling, structured logging, and cron monitoring across all major .NET frameworks.

Invoke This Skill When

  • User asks to "add Sentry to .NET", "set up Sentry in C#", or "install Sentry for ASP.NET Core"
  • User wants error monitoring, tracing, profiling, logging, or crons for a .NET app
  • User mentions SentrySdk.Init, UseSentry, Sentry.AspNetCore, or Sentry.Maui
  • User wants to capture unhandled exceptions in WPF, WinForms, MAUI, or Azure Functions
  • User asks about SentryOptions, BeforeSend, TracesSampleRate, or symbol upload

Note: SDK version and APIs below reflect Sentry NuGet packages ≥6.1.0. Always verify against docs.sentry.io/platforms/dotnet/ before implementing.


Phase 1: Detect

Run these commands to understand the project before making any recommendations:

# Detect framework type — find all .csproj files
find . -name "*.csproj" | head -20

# Detect framework targets
grep -r "TargetFramework\|Project Sdk" --include="*.csproj" .

# Check for existing Sentry packages
grep -r "Sentry" --include="*.csproj" . | grep "PackageReference"

# Check startup files
ls Program.cs src/Program.cs App.xaml.cs MauiProgram.cs 2>/dev/null

# Check for appsettings
ls appsettings.json src/appsettings.json 2>/dev/null

# Check for logging libraries
grep -r "Serilog\|NLog\|log4net" --include="*.csproj" .

# Check for companion frontend
ls ../frontend ../client ../web 2>/dev/null
cat ../package.json 2>/dev/null | grep -E '"next"|"react"|"vue"' | head -3

What to determine:

Question Impact
Framework type? Determines correct package and init pattern
.NET version? .NET 8+ recommended; .NET Framework 4.6.2+ supported
Sentry already installed? Skip install, go to feature config
Logging library (Serilog, NLog)? Recommend matching Sentry sink/target
Async/hosted app (ASP.NET Core)? UseSentry() on WebHost; no IsGlobalModeEnabled needed
Desktop app (WPF, WinForms, WinUI)? Must set IsGlobalModeEnabled = true
Serverless (Azure Functions, Lambda)? Must set FlushOnCompletedRequest = true
Frontend directory found? Trigger Phase 4 cross-link

Framework → Package mapping:

Detected Package to install
Sdk="Microsoft.NET.Sdk.Web" (ASP.NET Core) Sentry.AspNetCore
App.xaml.cs with Application base Sentry (WPF)
[STAThread] in Program.cs Sentry (WinForms)
MauiProgram.cs Sentry.Maui
WebAssemblyHostBuilder Sentry.AspNetCore.Blazor.WebAssembly
FunctionsStartup Sentry.Extensions.Logging + Sentry.OpenTelemetry
HttpApplication / Global.asax Sentry.AspNet
Generic host / Worker Service Sentry.Extensions.Logging

Phase 2: Recommend

Present a concrete recommendation based on what you found. Lead with a proposal — don't ask open-ended questions.

Recommended (core coverage):

  • ✅ Error Monitoring — always; captures unhandled exceptions, structured captures, scope enrichment
  • ✅ Tracing — always for ASP.NET Core and hosted apps; auto-instruments HTTP requests and EF Core queries
  • ✅ Logging — recommended for all apps; routes ILogger / Serilog / NLog entries to Sentry as breadcrumbs and events

Optional (enhanced observability):

  • ⚡ Profiling — CPU profiling; recommend for performance-critical services running on .NET 6+
  • ⚡ Crons — detect missed/failed scheduled jobs; recommend when Hangfire, Quartz.NET, or scheduled endpoints detected

Recommendation logic:

Feature Recommend when...
Error Monitoring Always — non-negotiable baseline
Tracing Always for ASP.NET Core — request traces, EF Core spans, HttpClient spans are high-value
Logging App uses ILogger<T>, Serilog, NLog, or log4net
Profiling Performance-critical service on .NET 6+
Crons App uses Hangfire, Quartz.NET, or scheduled Azure Functions

Propose: "I recommend setting up Error Monitoring + Tracing + Logging. Want me to also add Profiling or Crons?"


Phase 3: Guide

Option 1: Wizard (Recommended)

npx @sentry/wizard@latest -i dotnet

The wizard logs you into Sentry, selects your org and project, configures your DSN, and sets up MSBuild symbol upload for readable stack traces in production.

Skip to Verification after running the wizard.


Option 2: Manual Setup

Install the right package

# ASP.NET Core
dotnet add package Sentry.AspNetCore -v 6.1.0

# WPF or WinForms or Console
dotnet add package Sentry -v 6.1.0

# .NET MAUI
dotnet add package Sentry.Maui -v 6.1.0

# Blazor WebAssembly
dotnet add package Sentry.AspNetCore.Blazor.WebAssembly -v 6.1.0

# Azu
Полный SKILL.md на GitHub

Установить sentry-dotnet-sdk в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/crons.mdreferences/error-monitoring.mdreferences/logging.mdreferences/profiling.mdreferences/tracing.md

FAQ

Что делает скилл sentry-dotnet-sdk?

Full Sentry SDK setup for .NET. Use when asked to "add Sentry to .NET", "install Sentry for C#", or configure error monitoring, tracing, profiling, logging, or crons for ASP.NET Core, MAUI, WPF, WinForms, Blazor, Azure Functions, or any other .NET application.

Как установить скилл sentry-dotnet-sdk?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл sentry-dotnet-sdk запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить sentry-dotnet-sdk с