prometheus

Library for exposing metrics to Prometheus

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MIT
CI Status Passing
Downloads 0
Last Indexed 2026-07-21 05:24

Installation

nimble install prometheus
choosenim install prometheus
git clone https://github.com/dom96/prometheus

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
prometheus - - - - - - -

Source

Repository https://github.com/dom96/prometheus
Homepage https://github.com/dom96/prometheus
Registry Source nimble_official

README

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:nimTypeNames to 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