Liking cljdoc? Tell your friends :D

Prometheus Metrics

Build Status Dependencies Status Downloads cljdoc badge

A Clojure library designed to provide wrappers for Prometheus SimpleClient metrics.

Installation

Leiningen

Prometheus Metrics is available from Clojars.

Clojars Project

Usage

Require prometheus alpha.

(:require [prometheus.alpha :as prom])

Define a counter:

(prom/defcounter counter "A counter.")

Increment the counter:

(prom/inc! counter)

Create a compojure route so that the prometheus server can poll your application for metrics.

(GET "/metrics" [] (prom/dump-metrics))

License

Copyright © 2017 Alexander Kiel

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close