Skip to main content
RunBook Academy

ObservabilityXVII · Recording RulesRecordingRules

Naming Recording Rules

Intermediate⏱ ~18 minbash

What you'll learn

  • Explain naming recording rules in production terms
  • Configure and operate naming recording rules in a production observability stack
  • Recognise and diagnose the most common failure modes
  • Apply the discipline to a real Prometheus / Grafana / Loki / Tempo environment

Prerequisites

Verified against Prometheus 2.55.x · Alertmanager 0.28.x · node_exporter 1.8.x · blackbox_exporter 0.26.x · Grafana 11.x · Loki 3.x · Tempo current · OpenTelemetry Collector 0.110.x · Grafana Alloy current · Docker Engine 28.x · Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL / Rocky / AlmaLinux 9.x · 2026-08-13

Not yet marked complete on this device.

Recording rules name their result. The name must carry the meaning — what metric, what filter, what aggregation, what window.

A common convention is level:metric:operations — e.g. job:http_requests_total:rate5m. The level is one of job, instance, pod. The metric is the underlying one. The operations are the aggregation and window.

A team that documents the convention speeds up code review. A team that does not ends up with rules called metric_a_v2 that no one understands.

What it is

A precise definition of naming recording rules, scoped to production operations.

Why a sysadmin cares

Production framing. The operational pain this concept addresses, or the incident class it prevents.

How it works

The mental model.

How to configure it

# Configuration snippet illustrating the lesson topic
example_setting: value

How to validate it

promtool check config /etc/prometheus/prometheus.yml

How it can fail

The high-frequency failure modes:

  1. Silent misconfiguration.
  2. Crash on load.
  3. Performance regression.
  4. Permissions failure.
  5. Schema / version drift.

How to troubleshoot it

The diagnostic order:

  1. Was it working before?
  2. What does the service’s view say?
  3. What does the platform’s view say?
  4. Form hypothesis, find evidence, test, validate.

Security implications

Naming Recording Rules has security implications wherever the relevant component exposes an HTTP endpoint, an authentication layer, or a credential.

Performance implications

Performance implications come from cardinality, scrape / push interval, rule size, retention, and query cost.

Production guidance

  • Validate before applying.
  • Test changes in a non-production environment.
  • Document operational defaults in the team’s instrumentation guide.

Verification

You should now be able to answer:

  • What is naming recording rules in production terms?
  • Why does a sysadmin care about it?
  • How does it fail and how do you diagnose the failure?

Quiz

Knowledge check · 8 questions

  1. Q1. What is the primary purpose of naming recording rules?

  2. Q2. Which failure mode of naming recording rules is most operationally costly?

  3. Q3. Production verification should run on production hosts.

  4. Q4. First response when naming recording rules misbehaves?

  5. Q5. Name one signal that confirms naming recording rules is healthy.

  6. Q6. Which of these are validation steps?

  7. Q7. Right discipline when changing in production?

  8. Q8. Telemetry usefulness requires:

Passing score: 75%. Answers are checked in this browser.