counter
A metric that only ever goes up, such as the total number of requests or errors, from which rates are calculated.
In more detail
The raw total depends on how long the process has been running and resets when it restarts, so it is almost always read as a rate of increase over a time window. A value that needs to go down is a gauge, not a counter.
Example
jobs_enqueued_total counts every job that ever arrived; it never falls, even when the queue empties.Related terms
- metric — A number measured over time, such as requests per second or error count, that shows how a system behaves in aggregate.
- gauge — A metric that can go up and down and describes a level right now, such as queue depth, memory in use or open connections.
- histogram — A metric that counts measurements, such as request durations, into ranges of values so their distribution and percentiles can be calculated.
- rate() — The PromQL function that turns a counter into its average increase per second over a time window, handling restarts.
- counter reset — The moment a counter drops back to zero, usually because the process restarted.
- metric name — The name that identifies what a metric measures, such as http_request_duration_seconds.
Taught in
- Observability: Logs, Metrics, Traces — Modern API Architecture: REST, GraphQL & gRPC
- The Three Signals: Logs, Metrics And Traces — Full-Stack Observability: Metrics, Tracing & Logging
- Structured Logging And Why Text Fails — Full-Stack Observability: Metrics, Tracing & Logging
- Metric Types: Counters And Gauges — Full-Stack Observability: Metrics, Tracing & Logging
- Metric Types: Summaries And Histograms — 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
- Rates And Increases Over Time — Full-Stack Observability: Metrics, Tracing & Logging
- Instrumenting A Service With Client Libraries — Full-Stack Observability: Metrics, Tracing & Logging
- Four Bookings Or Two: Instruments And Temporality — OpenTelemetry Certified Associate (OTCA) Exam Prep
- A Histogram That Could Not Answer: Views — OpenTelemetry Certified Associate (OTCA) Exam Prep
- API And SDK Sprint: Fourteen Predictions — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Forty Four Of Sixty: The Mock And What It Tells You — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Six Minutes Nobody Saw: Prometheus In One Outage — Prometheus Certified Associate (PCA) Exam Prep
- Ninety Nine Percent Of What? SLIs, SLOs And SLAs — Prometheus Certified Associate (PCA) Exam Prep
- Observability Sprint: One Failed Checkout — Prometheus Certified Associate (PCA) Exam Prep
- Where Did Two Hours Go? Prometheus Architecture — Prometheus Certified Associate (PCA) Exam Prep
- 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
- The Server That Would Not Die: Selecting Data — Prometheus Certified Associate (PCA) Exam Prep
- Four Thousand Requests Vanished: Rates And Derivatives — Prometheus Certified Associate (PCA) Exam Prep
- Fifteen Requests Nobody Saw: Aggregating Over Time — Prometheus Certified Associate (PCA) Exam Prep
- Fifteen Lines And No Answer: Aggregating Over Labels — Prometheus Certified Associate (PCA) Exam Prep
- Under A Second, On Average: Histograms — Prometheus Certified Associate (PCA) Exam Prep
- The Export That Failed Quietly: Timestamp Metrics — Prometheus Certified Associate (PCA) Exam Prep
- PromQL Sprint: Ten Queries At Minute Twenty Two — 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
- Seventy Seven Percent, Book Now? The Full Mock — Prometheus Certified Associate (PCA) Exam Prep
- The Storage Decision: Key Value, Search And Blob — 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