Skip to content
Back to skills

Prometheus Metrics

ASecurity

Expose reliable Prometheus metrics using proper metric types, bounded label cardinality, and protected endpoints

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
developmentdatabasebackend

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill prometheus-metrics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prometheus Metrics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prometheus Metrics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-prometheus-metrics/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-prometheus-metrics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Expose reliable Prometheus metrics using proper metric types, bounded label cardinality, and protected endpoints
profile: standard
tags: observability, metrics, monitoring, backend
---

# Prometheus metrics

Use when instrumenting HTTP servers, workers, or databases with Prometheus counters, gauges, and histograms.

## Metric types and cardinality
- Choose the right type cleanly: monotonically increasing totals as `_total` `Counter`s (`http_requests_total`), point-in-time values as `Gauge`s, and request durations as `Histogram`s with domain-appropriate unit buckets (`_seconds`).
- Never put unbounded values (`userId`, `requestId`, `email`, raw URL path with IDs) into metric labels—high cardinality explodes TSDB memory across processes.
- Normalize route labels (`route="/users/:id"`, `method`, `status_class`) and register default process/runtime metrics cleanly.

## Exposition and alerts
- Serve `/metrics` on a separate internal management port or authenticated internal route so public users cannot scrape infrastructure metadata.
- Write `rate(...[5m])` alerts on non-zero failure denominators and handle absent metrics cleanly rather than triggering false-zero gaps.

## Verify
Scrape `/metrics` in integration tests to confirm Prometheus exposition format, bounded route labels across dynamic path IDs, and histogram bucket counts.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.