tenant-aware-metrics

Monitor per-tenant SaaS metrics with Prometheus dashboards and PostgreSQL aggregates.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/marquesfelip/agents-and-skills --skill tenant-aware-metrics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tenant-aware-metrics
Source: https://github.com/marquesfelip/agents-and-skills/tree/main/skills/tenant-aware-metrics
Command: npx skills add https://github.com/marquesfelip/agents-and-skills --skill tenant-aware-metrics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Monitors per-tenant SaaS metrics to detect noisy neighbors and capacity issues, enabling targeted capacity planning and fair resource sharing across tenants.

Core Features & Use Cases

  • Per-tenant metric registration with cardinality safeguards to keep Prometheus healthy.
  • HTTP middleware that emits per-tenant request counts, latency, and error signals while avoiding high-cardinality labels on latency metrics.
  • Quota usage metrics exported on a periodic schedule to support alerting on per-tenant exhaustion without label churn.
  • Scale-ready strategy: switch from Prometheus labels to per-tenant aggregates in PostgreSQL for large tenant bases (> 1000).
  • Grafana dashboards and alerting integration to drill down into a specific tenant and identify noisy neighbors.

Quick Start

Configure your SaaS app to emit per-tenant metrics and wire the middleware into your HTTP server.

Frequently Asked Questions about tenant-aware-metrics

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

FAQPage Schema
How do I monitor per-tenant metrics in a multi-tenant SaaS without causing Prometheus cardinality issues?

Per-tenant metrics monitoring uses HTTP middleware to emit request counts and latency while applying cardinality safeguards to keep Prometheus healthy. Quota usage metrics are exported on a periodic schedule to avoid label churn.

How do I detect noisy neighbors and capacity issues across SaaS tenants?

Detect noisy neighbors by applying per-tenant metric registration and Grafana dashboards to drill down into specific tenants. This identifies capacity issues and ensures fair resource sharing across your multi-tenant workloads.

What is the best way to scale per-tenant metrics beyond 1000 tenants?

To scale per-tenant metrics beyond 1000 tenants, switch from Prometheus labels to per-tenant aggregates stored in PostgreSQL. This scale-ready strategy prevents label explosion while maintaining quota signals and alerting.

Can I alert on per-tenant quota exhaustion without creating high-cardinality labels?

Yes, you can alert on per-tenant quota exhaustion by exporting quota usage metrics on a periodic schedule. This approach supports alerting without introducing high-cardinality labels on latency metrics or label churn.

How do I set up Grafana dashboards to drill down into specific tenant metrics?

Configure your SaaS app to emit per-tenant metrics and wire the HTTP middleware into your server. Grafana dashboards integrate with these Prometheus-based metrics to drill down into specific tenants and identify noisy neighbors.