Interview Prep/Monitoring & Observability/Alerting Strategy, SLOs & Runbooks

Why should alert labels and annotations be treated differently?

IntermediateProductionAlerting Strategy, SLOs & Runbooks
Answer

Labels form the alert's identity: Alertmanager groups, routes, inhibits and deduplicates on them. Changing a label value creates a different alert. Annotations are descriptive text and links that can change freely.

So never put the current value ({{ $value }}) in a label; every evaluation would create a "new" alert and break grouping and silences. Put values in annotations, and keep labels to stable dimensions such as severity, team, service, cluster.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Alerting Strategy, SLOs & Runbooks