Interview Prep/Monitoring & Observability/Observability Fundamentals & Signals

What are Prometheus metric naming conventions?

IntermediateConceptObservability Fundamentals & Signals
Answer
  • snake_case, prefixed with the domain or app: myapp_jobs_processed_total.
  • Base units in the name: _seconds, _bytes, _ratio (never milliseconds or MB).
  • Counters end in _total; histograms produce _bucket, _sum, _count.
  • Labels describe dimensions, not the metric itself: http_requests_total{code="500"}, not http_500_requests_total.

Prometheus 3.x supports UTF-8 metric and label names (to interoperate with OpenTelemetry dotted names), but we still use the classic convention for portability.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Observability Fundamentals & Signals