sentry
Comprehensive skill for Sentry error monitoring and performance tracking. Use when Claude needs to (1) Configure Sentry SDKs for error tracking and performance monitoring, (2) Manage releases, source maps, and debug symbols via CLI, (3) Query issues, events, and metrics via API, (4) Set up alerting and notification rules, (5) Configure sampling strategies and quota management, (6) Deploy self-hosted Sentry instances, (7) Integrate with OpenTelemetry for distributed tracing, or any other Sentry automation task.
What this skill does
# Sentry Skill Comprehensive guide for error monitoring, performance tracking, and application observability using Sentry. ## Quick Reference ### DSN (Data Source Name) The DSN is the unique identifier for your Sentry project: ``` https://<PUBLIC_KEY>@<HOST>/<PROJECT_ID> ``` Example: `https://[email protected]/1234567` ### Core Concepts | Concept | Description | |---------|-------------| | **Event** | Single instance of data sent to Sentry (error, transaction, etc.) | | **Issue** | Group of similar events deduplicated by fingerprint | | **Transaction** | Performance monitoring span representing a unit of work | | **Span** | Individual operation within a transaction (DB query, HTTP call) | | **Trace** | Connected series of transactions across services | | **Release** | Version of your code deployed to an environment | | **Environment** | Deployment target (production, staging, development) | ## SDK Installation & Configuration ### JavaScript/Node.js ```bash npm install @sentry/node @sentry/profiling-node ``` ```javascript const Sentry = require("@sentry/node"); const { nodeProfilingIntegration } = require("@sentry/profiling-node"); Sentry.init({ dsn: "https://[email protected]/1", release: process.env.RELEASE_VERSION || "1.0.0", environment: process.env.NODE_ENV || "development", // Error sampling (1.0 = 100% of errors) sampleRate: 1.0, // Performance monitoring (0.1 = 10% of transactions) tracesSampleRate: 0.1, // OR use dynamic sampling tracesSampler: (samplingContext) => { if (samplingContext.transactionContext.name === "/health") { return 0; // Don't sample health checks } if (samplingContext.parentSampled !== undefined) { return samplingContext.parentSampled; // Inherit parent decision } return 0.1; // Default 10% }, // Profiling profilesSampleRate: 0.1, integrations: [nodeProfilingIntegration()], // Data scrubbing beforeSend(event) { if (event.request?.headers) { delete event.request.headers["Authorization"]; } return event; }, }); ``` ### Python ```bash pip install sentry-sdk ``` ```python import sentry_sdk from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration sentry_sdk.init( dsn="https://[email protected]/1", release="[email protected]", environment="production", # Error sampling sample_rate=1.0, # Performance monitoring traces_sample_rate=0.1, # OR dynamic sampling traces_sampler=lambda ctx: ( 0 if ctx.get("transaction_context", {}).get("name") == "/health" else 0.1 ), # Profiling profiles_sample_rate=0.1, # Integrations integrations=[ FlaskIntegration(), SqlalchemyIntegration(), ], # Data scrubbing before_send=lambda event, hint: scrub_sensitive_data(event), ) def scrub_sensitive_data(event): if event.get("request", {}).get("headers"): event["request"]["headers"].pop("Authorization", None) return event ``` ### Go ```bash go get github.com/getsentry/sentry-go ``` ```go package main import ( "log" "time" "github.com/getsentry/sentry-go" ) func main() { err := sentry.Init(sentry.ClientOptions{ Dsn: "https://[email protected]/1", Release: "[email protected]", Environment: "production", TracesSampleRate: 0.1, BeforeSend: func(event *sentry.Event, hint *sentry.EventHint) *sentry.Event { // Scrub sensitive data return event }, }) if err != nil { log.Fatalf("sentry.Init: %s", err) } defer sentry.Flush(2 * time.Second) } ``` ## Error Capturing ### Manual Error Capture ```javascript // JavaScript try { riskyOperation(); } catch (error) { Sentry.captureException(error, { tags: { component: "payment" }, extra: { orderId: "12345" }, user: { id: "user-123", email: "[email protected]" }, }); } // Capture message Sentry.captureMessage("Something unexpected happened", "warning"); ``` ```python # Python try: risky_operation() except Exception as e: sentry_sdk.capture_exception(e) sentry_sdk.set_tag("component", "payment") sentry_sdk.set_extra("order_id", "12345") sentry_sdk.set_user({"id": "user-123", "email": "[email protected]"}) # Capture message sentry_sdk.capture_message("Something unexpected happened", level="warning") ``` ### Breadcrumbs ```javascript // Add context breadcrumbs Sentry.addBreadcrumb({ category: "auth", message: "User logged in", level: "info", data: { userId: "123" }, }); ``` ### Scopes ```javascript // Configure scope for context Sentry.configureScope((scope) => { scope.setUser({ id: "user-123" }); scope.setTag("page_locale", "en-US"); scope.setExtra("session_data", { cart_items: 5 }); }); // Isolated scope Sentry.withScope((scope) => { scope.setTag("isolated", "true"); Sentry.captureException(new Error("Scoped error")); }); ``` ## Performance Monitoring ### Manual Transactions ```javascript const transaction = Sentry.startTransaction({ op: "task", name: "Process Order", }); // Set transaction on scope Sentry.getCurrentHub().configureScope((scope) => { scope.setSpan(transaction); }); // Create child spans const span = transaction.startChild({ op: "db.query", description: "SELECT * FROM orders", }); // Do work... await queryDatabase(); span.finish(); transaction.finish(); ``` ### Distributed Tracing ```javascript // Service A - Create trace const transaction = Sentry.startTransaction({ name: "API Request" }); const traceHeader = transaction.toTraceparent(); // Pass traceHeader to Service B via HTTP header: sentry-trace // Service B - Continue trace const incomingTrace = request.headers["sentry-trace"]; const transaction = Sentry.startTransaction({ name: "Process Request", op: "http.server", }, { parentSampled: true }); ``` ## Sentry CLI ### Installation ```bash # npm npm install -g @sentry/cli # curl curl -sL https://sentry.io/get-cli/ | bash # Homebrew brew install getsentry/tools/sentry-cli ``` ### Authentication ```bash # Login interactively sentry-cli login # Or set auth token export SENTRY_AUTH_TOKEN=your-token export SENTRY_ORG=your-org export SENTRY_PROJECT=your-project ``` ### Release Management ```bash # Create release sentry-cli releases new v1.0.0 # Associate commits (auto-detect from git) sentry-cli releases set-commits v1.0.0 --auto # Or specify commit range sentry-cli releases set-commits v1.0.0 --commit "repo@from_sha..to_sha" # Upload source maps sentry-cli releases files v1.0.0 upload-sourcemaps ./dist \ --url-prefix '~/static/js' \ --rewrite # Upload debug symbols (iOS/Android/Native) sentry-cli debug-files upload --include-sources path/to/symbols # Deploy release to environment sentry-cli releases deploys v1.0.0 new -e production # Finalize release sentry-cli releases finalize v1.0.0 ``` ### Source Maps Workflow ```bash # Build with source maps npm run build # Create release and upload export VERSION=$(sentry-cli releases propose-version) sentry-cli releases new $VERSION sentry-cli releases files $VERSION upload-sourcemaps ./dist \ --url-prefix '~/' \ --validate sentry-cli releases finalize $VERSION ``` ### Cron Monitoring ```bash # Wrap a cron job sentry-cli monitors run <monitor-slug> -- /path/to/script.sh # Or use check-in API sentry-cli monitors run <monitor-slug> --check-in-status in_progress # ... run job ... sentry-cli monitors run <monitor-slug> --check-in-status ok ``` ### Send Test Event ```bash sentry-cli send-event -m "Test event from CLI" ``` ## API Reference ### Authentication ```bash # Bearer token (recommended) curl -H "Authorization: Bearer <AUTH_TOKEN>" \ https://sentry.io/api/0/projects/ # DSN-based (limited endpoints) curl -u <PUBLIC_KEY>: \ https://sentry.io/api/<PROJECT_ID>/store/ ``` ### Common Endpo
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.