sentry-setup-metrics

Configure Sentry custom metrics for counters, gauges, and distributions in JavaScript and Python.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/sergical/gatekeeper --skill sentry-setup-metrics-sergical
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-setup-metrics
Source: https://github.com/sergical/gatekeeper/tree/main/.agents/skills/sentry-setup-metrics
Command: npx skills add https://github.com/sergical/gatekeeper --skill sentry-setup-metrics-sergical

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Instrumenting applications to collect and monitor custom metrics is often manual and error-prone; this skill provides a guided approach to enable and use Sentry metrics in JavaScript and Python projects.

Core Features & Use Cases

  • Enables counters, gauges, and distributions to track API usage, latency, and system health.
  • Demonstrates how to initialize and emit metrics in JS and Python, with optional filtering.
  • Use case: monitor endpoint performance and error rates across a service.

Quick Start

Start by enabling Sentry metrics in your app and emitting a sample metric to verify setup.

Frequently Asked Questions about sentry-setup-metrics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up custom metrics in Sentry for a Python or JavaScript app?

To set up Sentry custom metrics, you initialize the Sentry SDK and use Sentry.metrics to emit counters, gauges, and distributions directly in your JavaScript or Python code. This instruments your application to track performance and system health.

What is the difference between counters, gauges, and distributions in Sentry metrics?

Sentry metrics use counters to track cumulative values, gauges to record instantaneous snapshots, and distributions to capture statistical data like latency. You emit these metrics with attributes to observe application behavior and monitor endpoint performance.

Can I filter sensitive data when instrumenting app performance with Sentry metrics?

Yes, you can filter sensitive data when instrumenting app performance with Sentry metrics. The setup includes filtering options that suppress sensitive data before emitting metrics with attributes from your JavaScript or Python service.

Does Sentry metrics instrumentation work for both JavaScript and Python projects?

Yes, Sentry metrics instrumentation works for both JavaScript and Python projects. It demonstrates initialization and usage of Sentry.metrics in code for both environments to monitor API usage, latency, and error rates across a service.

What is the best way to monitor API latency and error rates across a service?

The best way to monitor API latency is by instrumenting your application with Sentry custom metrics. By emitting distributions for latency and counters for error rates with attributes, you can observe endpoint performance and system health across your service.