This is the Go client library for Prometheus. It has two separate parts, one for instrumenting application code, and one for creating clients that talk to the Prometheus HTTP API.
This library requires Go1.7 or later.
While our goal is to follow Semantic Versioning, this repository is still pre-1.0.0. To quote the Semantic Versioning spec: “Anything may change at any time. The public API should not be considered stable.” We know that this is at odds with the widespread use of this library. However, just declaring something 1.0.0 doesn't make it 1.0.0. Instead, we are working towards a 1.0.0 release that actually deserves its major version number.
Having said that, we aim for always keeping the tip of master in a workable state. We occasionally tag versions and track their changes in CHANGELOG.md, but this happens mostly to keep dependency management tools happy and to give people a handle they can talk about easily. In particular, all commits in the master branch have passed the same testing and reviewing. There is no QA process in place that would render tagged commits more stable or better tested than others.
There is a plan behind the current (pre-1.0.0) versioning, though:
prometheus directory contains the instrumentation library. See the guide on the Prometheus website to learn more about instrumenting applications.
examples directory contains simple examples of instrumented code.
api/prometheus directory contains the client for the Prometheus HTTP API. It allows you to write Go applications that query time series data from a Prometheus server. It is still in alpha stage.
model packages has been moved to
text packages are now contained in
See the contributing guidelines and the Community section of the homepage.