metric label
A name and value attached to a metric, such as status="200", that splits one metric into separate series you can compare.
In more detail
Every distinct combination of label values creates a new series, with its own memory and storage, so labels must come from a small, bounded set such as operation, status family or dependency. Never use user identifiers, request identifiers or full addresses as label values.
Example
http_requests_total{method="GET",route="/checkout",status="200"}Related terms
- cardinality — The number of distinct values a metric label can take, which multiplies how many separate series a metric creates.
- metric — A number measured over time, such as requests per second or error count, that shows how a system behaves in aggregate.
- time series — A sequence of timestamped values for one metric name with one exact set of label values.
- label matcher — A condition on a label inside a PromQL selector: = for an exact value, != to exclude, =~ and !~ for regular expressions.
- route template — The pattern of a web path with its variable parts left as placeholders, such as /orders/{id}, used instead of the raw path.
Taught in
- Observability: Logs, Metrics, Traces — Modern API Architecture: REST, GraphQL & gRPC
- Metric Types: Counters And Gauges — Full-Stack Observability: Metrics, Tracing & Logging
- Cardinality And How It Bankrupts You — Full-Stack Observability: Metrics, Tracing & Logging
- The Prometheus Exposition Format — Full-Stack Observability: Metrics, Tracing & Logging
- PromQL Basics And Selectors — Full-Stack Observability: Metrics, Tracing & Logging
- Instrumenting A Service With Client Libraries — Full-Stack Observability: Metrics, Tracing & Logging
- Cart Versus cart: The Data Model And What A Scrape Returns — Prometheus Certified Associate (PCA) Exam Prep
- Off By Five: What Prometheus Is Not For — Prometheus Certified Associate (PCA) Exam Prep
- Fundamentals Sprint: Nine Calls On The Server — Prometheus Certified Associate (PCA) Exam Prep
- Fifteen Lines And No Answer: Aggregating Over Labels — Prometheus Certified Associate (PCA) Exam Prep
- Is The New Version Worse? Binary Operators And Matching — Prometheus Certified Associate (PCA) Exam Prep
- Thirty Second Checkouts Nobody Saw: Client Libraries — Prometheus Certified Associate (PCA) Exam Prep
- Milliseconds Versus Seconds: Naming Metrics And Labels — Prometheus Certified Associate (PCA) Exam Prep
- Instrumentation Sprint: Sixteen Calls On Code And Exporters — Prometheus Certified Associate (PCA) Exam Prep
- Twelve Green Panels: Dashboarding Basics — Prometheus Certified Associate (PCA) Exam Prep
- Alerting Sprint: Eleven Calls In Three Rounds — Prometheus Certified Associate (PCA) Exam Prep
- What A Design Is For, And How To Run A Design Discussion — Scalable System Design & Distributed Architecture
- Latency Numbers Every Engineer Should Know — Scalable System Design & Distributed Architecture
- Consistency, And The Truth About CAP — Scalable System Design & Distributed Architecture
- Observability As A Design Input — Scalable System Design & Distributed Architecture
- Worked Design Three: A Metrics Ingestion Pipeline — Scalable System Design & Distributed Architecture
- Worked Design Three: Scaling The Metrics Pipeline — Scalable System Design & Distributed Architecture