sentry-performance-tuning

Featured

Optimize Sentry performance monitoring for lower overhead and higher signal. Use when tuning tracesSampleRate vs tracesSampler, configuring continuous profiling, fixing high-cardinality transaction names, adding custom span measurements, reducing SDK overhead, or setting Web Vitals thresholds. Trigger: "sentry performance optimize", "tune sentry sampling", "reduce sentry overhead", "sentry web vitals", "sentry profiling setup".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Sentry Performance Tuning ## Overview Optimize Sentry's performance monitoring pipeline to maximize signal quality while minimizing SDK overhead and event volume costs. Covers the v8 SDK API for `@sentry/node`, `@sentry/browser`, and `sentry-sdk` (Python), targeting `sentry.io` or self-hosted Sentry 24.1+. ## Prerequisites - Sentry SDK v8+ installed (`@sentry/node` >= 8.0.0 or `sentry-sdk` >= 2.0.0) - `Sentry.init()` called with a valid DSN before any application code runs - Performance monitoring enabled (`tracesSampleRate > 0` or a `tracesSampler` function) - Access to the Sentry Performance dashboard to verify changes ## Instructions ### Step 1 — Replace Static `tracesSampleRate` with Dynamic `tracesSampler` A flat `tracesSampleRate: 0.1` samples all routes equally. The `tracesSampler` callback makes per-transaction decisions based on route, operation type, and upstream trace context. ```typescript import * as Sentry from '@sentry/node'; Sentry.init({ dsn: process.env.SENTRY_DSN, // tracesSampler replaces tracesSampleRate — do not set both tracesSampler: (samplingContext) => { const { name, attributes, parentSampled } = samplingContext; // Honor parent sampling for distributed trace consistency if (parentSampled !== undefined) return parentSampled ? 1.0 : 0; // Drop noise — health probes, static assets if (name?.match(/\/(health|ready|alive|ping|metrics)$/)) return 0; if (name?.match(/\.(js|css|png|jpg|svg|woff2?|ico)$/)) return 0...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category