liveBook · Manning

Prometheus client library

As explained in Learn Docker in a Month of Lunches, Second Edition

A Prometheus client library is a language-specific software library that records application metrics and exposes them in a format Prometheus can collect.

A Prometheus client library records application metrics and exposes an HTTP endpoint that Prometheus can collect. Language-specific clients also export useful runtime data automatically. section 9.2

A client library can expose:

  • Runtime-level metrics, such as active Go goroutines or Java virtual-machine memory usage. section 9.2

Inspecting application metrics

Start the image gallery stack with Docker Compose, use the application, and browse to its /metrics endpoint. Generate several requests, then inspect the endpoint again to see custom and runtime values.

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Explains automatic runtime collection, custom metric updates, and endpoint verification without detailing the full client-library API.
Examples
Uses a containerized image gallery, Go and Java runtime metrics, Node.js counters and gauges, and /metrics endpoints.
What you can do after
Operate/configure it to expose runtime metrics, define custom Node.js metrics, generate requests, and inspect collected values.
How it connects
Connects application metrics with Prometheus, HTTP endpoints, containers, runtime metrics, and Docker Compose.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.