liveBook · Manning

Counter

A counter is a metric representing a cumulative quantity that generally increases as occurrences are counted, apart from resets or other explicit reinitialization.

How 4 Manning books explain it

Machine Learning Platform Engineering

A counter is a monotonically nondecreasing metric intended to count occurrences such as requests.

How it is used
Counts cumulative application events for Prometheus scraping, Grafana visualization, and operational monitoring.
How deep it goes
Defines monotonicity, demonstrates declaration and incrementing, and distinguishes counters from gauges and histograms.
Examples
Counts HTTP requests and ranked-movie responses, then visualizes cumulative activity as Grafana time series.
What you can do after
Apply it via prometheus-client by defining a Counter, incrementing events, exposing /metrics, and charting activity.

Read how Machine Learning Platform Engineering explains counter →

Learn Docker in a Month of Lunches, Second Edition

A counter is a metric that increases over time and represents a cumulative count of events.

How it is used
Records cumulative application events for Prometheus collection and operational dashboards.
How deep it goes
Explains the definition, declaration, increment operation, endpoint inspection, and dashboard query, but not advanced metric types.
Examples
Demonstrates access requests, HTTP 200 responses, Node.js instrumentation, repeated requests, and Grafana dashboard queries.
What you can do after
Apply it via a Prometheus client library, expose metrics, generate traffic, and visualize cumulative events in Grafana.

Read how Learn Docker in a Month of Lunches, Second Edition explains counter →

Cloud Observability in Action

A counter is a metric type whose value represents a quantity that generally increases over time, apart from resets.

How it is used
Tracks cumulative event occurrences and supports calculating event counts over selected time ranges.
How deep it goes
Explains monotonic values, point-in-time totals, range differences, labels, and cardinality risks.
Examples
Uses HTTP invocation totals, status-code series, 400 responses, and Prometheus API request labels.
What you can do after
Evaluate cumulative totals and calculate event counts across time ranges using labeled time series.

Read how Cloud Observability in Action explains counter →

Quarkus in Action

A counter is a metric that records a value intended to increase monotonically as occurrences are counted.

How it is used
Counts business events in Quarkus applications alongside automatically collected framework metrics.
How deep it goes
Defines counter semantics and demonstrates annotation, registry, metadata, exposure, and visualization, without detailing storage internals.
Examples
Uses orders and car registrations, @Counted methods, MeterRegistry calls, /q/metrics output, and Grafana dashboards.
What you can do after
Build it from scratch with @Counted or MeterRegistry, then expose and inspect it through Prometheus-compatible metrics.

Read how Quarkus in Action explains counter →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.