Skip to content

Latest commit

 

History

History
31 lines (16 loc) · 935 Bytes

README.md

File metadata and controls

31 lines (16 loc) · 935 Bytes

Using prom-client library in Node.js

Lab 1

Emit the default metrics lab1

Lab 2

Emit garbage collection metrics lab2

Lab 3

Emit http server metrics lab3

Lab 4

Push metrics to Prometheus push gateway lab4

Metrics are not available via scrape endpoint /metrics on the Node.js web server.

This use case is useful when the container has a very short life span (ie Serverless/Knative) and the scrape time window is to large to get metrics from the container.

Lab 5

Combined all examples lab5

Putting all the examples together, collects all metrics, sends to push gateway and available via scrape endpoint on the Node.js web server

Lab 6

Using the prom-client express middleware wrapper express-prom-bundle