home / skills / jeremylongshore / claude-code-plugins-plus-skills / sentry-performance-tracing

This skill helps you set up and optimize Sentry performance tracing to monitor requests and diagnose bottlenecks across services.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill sentry-performance-tracing

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
1.2 KB
---
name: sentry-performance-tracing
description: |
  Execute set up performance monitoring and distributed tracing with Sentry.
  Use when implementing performance tracking, tracing requests,
  or monitoring application performance.
  Trigger with phrases like "sentry performance", "sentry tracing",
  "sentry APM", "monitor performance sentry".
allowed-tools: Read, Write, Edit, Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
---

# Sentry Performance Tracing

## Prerequisites
- Sentry SDK installed
- Performance plan enabled in Sentry
- Understanding of tracing concepts


See `{baseDir}/references/implementation.md` for detailed implementation guide.

## Output
- Performance data visible in Sentry Performance dashboard
- Distributed traces across services
- Span breakdowns for bottleneck identification

## Error Handling

See `{baseDir}/references/errors.md` for comprehensive error handling.

## Examples

See `{baseDir}/references/examples.md` for detailed examples.

## Resources
- [Sentry Performance](https://docs.sentry.io/product/performance/)
- [Distributed Tracing](https://docs.sentry.io/product/performance/distributed-tracing/)

Overview

This skill sets up performance monitoring and distributed tracing with Sentry to track request latency, identify bottlenecks, and visualize end-to-end traces across services. It helps instrument Python applications, collect spans, and surface performance data in the Sentry Performance dashboard. Use it to get actionable insights into slow transactions and error-correlated performance degradations.

How this skill works

The skill configures the Sentry SDK for performance monitoring, starts and finishes transactions, and creates spans around code sections such as HTTP requests, database calls, and background jobs. It propagates trace headers across service boundaries to build distributed traces and sends sampled performance events to Sentry for analysis. The result is span-level breakdowns and trace waterfall views that reveal hotspots and latency sources.

When to use it

  • When you need end-to-end visibility of latency across microservices
  • When tracking slow endpoints, database queries, or job processing times
  • During performance regression hunts after a deploy or release
  • When correlating errors with performance spikes
  • When implementing observability for new services or migrations

Best practices

  • Enable Sentry Performance plan and set an appropriate sample rate to control event volume
  • Instrument high-impact transaction boundaries and critical spans first (HTTP, DB, cache, external APIs)
  • Propagate tracing headers consistently to maintain distributed traces across services
  • Use meaningful transaction and span names to simplify filter and search in the dashboard
  • Aggregate low-value spans or use span limits to reduce noise and cost

Example use cases

  • Instrument a web request handler to measure routing, DB query, and template render spans
  • Add tracing to background workers to correlate job runtime with upstream requests
  • Trace an external API call to pinpoint third-party latency affecting your service
  • Compare trace samples before and after a deploy to detect performance regressions
  • Map slow database queries by isolating DB spans in trace waterfalls

FAQ

Do I need a special plan to use performance features?

Yes. Enable Sentry Performance (or an appropriate plan) in your organization to collect and view performance data.

How do I avoid sending too much data?

Adjust the sample rate, limit spans per transaction, and instrument only key code paths to control event volume and cost.