mirror of
https://github.com/dom96/prometheus
synced 2026-01-10 06:51:13 +00:00
No description
| src | ||
| tests | ||
| prometheus.nimble | ||
| README.md | ||
Prometheus client library for Nim
This is a Nim client library for Prometheus. Features include:
- Multiple metric types:
- Counters
- Gauges
- Histograms
- Nim-specific collectors:
- Async collector (logs statistics about pending futures, timers and callbacks from Nim's async event loop)
- GC collector (logs heap allocation statistics, compile with
-d:nimTypeNamesto get granular information about the allocated object types)
Usage
Add this into your .nimble file:
requires "prometheus"
You then need to serve the Prometheus metrics over HTTP, if you're using Jester you can do so by simply:
routes:
get "/metrics":
let data = generateLatest()
resp Http200, {"Content-type": "text/plain"}, data
Testing
Run:
nimble test
License
MIT