Przejdź do treści
Biblioteka skilli
DevOps i chmura · Analiza

sentry

/sentry

Pomaga w monitoringu błędów w Sentry: śledzenie wyjątków, tracing wydajności, source maps, wydania i breadcrumbs przy diagnozowaniu stack trace'ów z produkcji.

Repozytorium
Agent-Skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
01.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 01.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pomaga w monitoringu błędów w Sentry: śledzenie wyjątków, tracing wydajności, source maps, wydania i breadcrumbs przy diagnozowaniu stack trace'ów z produkcji.

Oryginalny opis (EN)

Expert Sentry error monitoring assistance covering exception tracking, performance tracing, source maps, releases, and breadcrumbs. Use when monitoring production errors and diagnosing stack traces.

Jak działa

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Sekcje z nagłówków SKILL.md, w oryginale · 156 linii, 586 słów
Podgląd SKILL.md
---
name: sentry
description: Expert Sentry error monitoring assistance covering exception tracking, performance tracing, source maps, releases, and breadcrumbs. Use when monitoring production errors and diagnosing stack traces.
---

# Sentry

Sentry provides real-time application performance monitoring, distributed tracing, and code-level error diagnostics across frontend, backend, and mobile stacks.

## When to Use

- **Real-Time Application Error Monitoring**: Capturing unhandled exceptions, stack traces, and runtime errors in production.
- **End-to-End Performance Tracing**: Measuring transaction durations, database queries, and distributed trace spans.
- **Source Map Processing & De-Minification**: Translating minified production bundle errors back to original TypeScript source lines.
- **Session Replay & User Crash Feedback**: Watching user sessions to reproduce difficult-to-catch client-side bugs.

## Quick Start

```javascript
import * as Sentry from "@sentry/node";

Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  tracesSampleRate: 1.0,
});

try {
  myFunction();
} catch (e) {
  Sentry.captureException(e);
}
```

## Core Concepts

### Node.js / Next.js SDK Initialization with Performance Tracing

Instrumenting application with trace sampling and error capture:

```typescript
import * as Sentry from "@sentry/node";

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  environment: process.env.NODE_ENV || "production",
  release: "api-service@2026.1.0",
  tracesSampleRate: 0.1, // Sample 10% of transactions for performance metrics

  // Filter sensitive data before transmitting to Sentry
  beforeSend(event, hint) {
    if (event.request?.headers) {
      delete event.request.headers["authorization"];
      delete event.request.headers["cookie"];
    }
    return event;
  },
});
```

### Manual Error Capture with Custom Context

Enriching errors with user context and custom tags:

```typescript
import * as Sentry from "@sentry/node";

async function processPayment(userId: string, amountCents: number) {
  try {
    // Simulated payment logic
    throw new Error("Payment gateway rejected authorization token");
  } catch (error) {
    Sentry.withScope((scope) => {
      scope.setUser({ id: userId });
      scope.setTag("payment.provider", "stripe");
      scope.setExtra("amount_cents", amountCents);
      scope.setLevel("error");

      Sentry.captureException(error);
    });
    throw error;
  }
}
```

### Custom Performance Spans

Measuring execution duration of critical code blocks:

```typescript
import * as Sentry from "@sentry/node";

async function calculateRiskScore(orderId: string): Promise<number> {
  return await Sentry.startSpan(
    { name: "calculateRiskScore", op: "fraud.evaluation" },
    async (span) => {
      span.setAttribute("order_id", orderId);
      // Run intensive risk calculation
      return 0.95;
    },
  );
}
```

## Common Patterns

### Node.js / Express Error Middleware with User Context

**Problem**: Production exceptions logged without user session context or breadcrumb history.

**Solution**:
Configure Sentry tracing and request isolation:

```javascript
import * as Sentry from "@sentry/node";

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  tracesSampleRate: 0.2, // Capture 20% of transactions
  environment: process.env.NODE_ENV,
});

// Attach user context in auth middleware
app.use((req, res, next) => {
  if (req.user) {
    Sentry.setUser({ id: req.user.id, email: req.user.email });
  }
  next();
});

// Sentry error handler must be before any other error middleware
Sentry.setupExpressErrorHandler(app);
```

## Best Practices

**Do**:

- Configure `release` tags to correlate error occurrences with specific Git commits and deployments.
- Upload source maps during CI/CD using `@sentry/cli` to get clear TypeScript line numbers in stack traces.
- Sanitize sensitive PII, credit card numbers, and authorization headers in `beforeSend`.
- Tune `tracesSampleRate` in high-throughput environments to prevent excessive ingestion costs.

**Don't**:

- Leave DSN keys exposed in public repositories without domain restriction rules.
- Catch exceptions silently without logging or passing to `Sentry.captureException()`.
- Log high-frequency expected user validation errors (e.g. invalid form fields) as Sentry exceptions.

## Troubleshooting

| Error                                     | Cause                                                                      | Solution                                                                           |
| :---------------------------------------- | :------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- |
| `Source maps not showing in stack traces` | Source maps not uploaded during build or release version mismatch.         | Upload source maps via `@sentry/webpack-plugin` with identical `release` tag.      |
| `Sentry DSN not capturing events`         | DSN variable missing in production runtime or rate limit exceeded.         | Verify `SENTRY_DSN` is set and inspect Sentry Organization Stats for quota spikes. |
| `Transactions flooded / quota exhausted`  | `tracesSampleRate` set to 1.0 (100%) on high-traffic production endpoints. | Reduce `tracesSampleRate` to 0.05 - 0.2 (5% - 20%).                                |

## References

- [Sentry Documentation](https://docs.sentry.io/)

Wersje

RepozytoriumWynikLicencja
Ta strona · G1Joshi/Agent-Skills100MIT
znlgis/opengis-skills100MIT
TerminalSkills/skills100Apache-2.0
tech-leads-club/agent-skills100MIT
foryourhealth111-pixel/Vibe-Skills100Apache-2.0
getsentry/junior100Apache-2.0
greedychipmunk/agent-skills100MIT
letta-ai/skills100MIT
tuannv14/claude-team-toolkit100MIT

Migawka bazy z 28.10.2026 · wersja paczki ebb8f30df8cb (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100sentry-performance-tracing
    Konfiguruje w Sentry monitoring wydajności i śledzenie rozproszone, w tym śledzenie żądań i wydajności aplikacji.
  • 100error-tracking
    Integruje śledzenie i monitoring błędów (Sentry, Datadog RUM, Bugsnag): source maps, breadcrumbs, śledzenie wydań, monitoring wydajności i konfigurację alertów.
  • 100typescript-sentry
    Konfiguruje monitoring błędów i wydajności Sentry SDK dla Bun, Node.js i Next.js: przechwytywanie błędów, breadcrumbs, spany, monitoring cron, source mapy, logi i profilowanie.
  • 95sentry-performance-monitoring
    Prowadzi przez konfigurację monitorowania wydajności w Sentry: transakcje, spany, rozproszone śledzenie i profilowanie aplikacji.
  • 100sentry-performance-tuning
    Optymalizuje konfigurację monitoringu wydajności w Sentry, w tym sample rate, narzut SDK i jakość danych o wydajności.
  • 100sentry-ci-integration
    Łączy Sentry z potokami CI/CD, takimi jak GitHub Actions i GitLab CI, w zakresie wydań i source maps.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.