A counter is a numeric metric that increases or stays the same. Use it for cumulative event counts, such as access requests or HTTP 200 responses; choose the metric type and update it at the correct time, while Prometheus and its client library handle collection. section 9.2 section 9.4
Implement a counter by declaring it, updating it when the event occurs, and exposing the metrics endpoint.
- Use the client library appropriate to the language; Go and Java expose equivalent instrumentation through different APIs. section 9.2
Count requests and inspect the result
Run the image gallery application, send repeated HTTP GET requests, and browse to its /metrics endpoint. The output includes custom request data alongside runtime metrics. In Grafana, sum image_gallery_requests_total while removing the instance dimension to visualize responses across containers. section 9.4



