Metrics Naming and Cardinality Guide

Keep metrics useful and affordable.

Added October 15, 2026. Written with AI assistance and checked for clarity and placeholders; not reviewed by a lawyer, accountant, clinician or other professional. How these prompts are made

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

Write a metrics standard for my team. Metrics system: [METRICS_SYSTEM]. Examples of current metric names and labels: [CURRENT_EXAMPLES]. Cost or performance problems we have had: [PROBLEMS].

Define naming rules (prefix, units in the name, suffixes for counters and histograms), required labels and forbidden labels (user IDs, request IDs, full URLs), histogram bucket guidance for latency with example boundaries, and a cardinality budget per service. Review my current examples against the rules in a table with Metric | Issue | Fix. Provide a method to find the highest-cardinality metrics in my system using a generic query concept. Add a pull request checklist for new metrics and a plan to retire unused metrics after 90 days.

Add worked examples of five bad metric designs and their corrected forms, such as putting an order ID in a label or encoding units inconsistently. Provide a simple formula to estimate the number of time series a metric will create from label combinations, and a worked example showing why adding a single high-cardinality label can multiply storage cost.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

See an example result (fictional data)
Rules: prefix with service, units in the name, _total for counters, _seconds for durations.
Forbidden labels: user_id, request_id, full URL.
Review
shop_orders{user="4421"} -> shop_orders_total{region="eu"}
latency{ms} -> shop_request_duration_seconds (histogram)
Estimating series: 5 endpoints x 4 status classes x 3 regions = 60 series; adding user_id with 100,000 users multiplies to 6,000,000.
Buckets for latency: 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5 seconds.
Retire unused metrics after 90 days.
Pull request check: does the metric name include a unit, and does any label have more than 100 possible values? If yes, redesign before merging.

Illustrative only, made-up data. Your results will differ and must be reviewed.

Rate this prompt

Related prompts