Prometheus instrumentation library for Go applications
Go to file
beorn7 dd20712622 Allow currying of metric vec's
The idea behind it is described in detail in
https://github.com/prometheus/client_golang/issues/320 .

This commit also updates the example given in
promhttp/instrument_server_test.go , which nicely illustrates the
benefit of this change.

So far, currying could be emulated by creating different metric vec's
with different values in their ConstLabels. This was quite difficult
to grasp - which is essentially what was done in the example mentioned
above. Now that this use case can be solved without ConstLabels, we
can safely declare ConstLabels as rarely used. (Perhaps we can
deprecate them entirely one day, but I'll take a raincheck on that
when the changes of v0.10 have materialized.) This commit thus also
updates the ConstLabel doc comments in the various Opts. (It contained
fairly outdated stuff anyway.)
2017-12-22 15:56:11 +01:00
api v1: support series API 2017-11-24 20:12:53 +08:00
examples Create Docker images for the examples 2017-09-19 13:59:05 +01:00
prometheus Allow currying of metric vec's 2017-12-22 15:56:11 +01:00
.gitignore Create Docker images for the examples 2017-09-19 13:59:05 +01:00
.travis.yml Drop Go1.6 support, add test for Go1.9 2017-09-06 15:36:30 +02:00
CHANGELOG.md Cut v0.8.0 2016-08-17 16:08:12 +02:00
CONTRIBUTING.md Replace AUTHORS.md by an updated MAINTAINERS.md 2017-02-16 19:49:34 +01:00
LICENSE License cleanup 2015-01-22 16:13:15 +01:00
MAINTAINERS.md Replace AUTHORS.md by an updated MAINTAINERS.md 2017-02-16 19:49:34 +01:00
NOTICE Create a public registry interface and separate out HTTP exposition 2016-08-02 18:46:22 +02:00
README.md Drop Go1.6 support, add test for Go1.9 2017-09-06 15:36:30 +02:00
VERSION Cut v0.8.0 2016-08-17 16:08:12 +02:00

README.md

Prometheus Go client library

Build Status Go Report Card

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.

Instrumenting applications

code-coverage go-doc

The prometheus directory contains the instrumentation library. See the best practices section of the Prometheus documentation to learn more about instrumenting applications.

The examples directory contains simple examples of instrumented code.

Client for the Prometheus HTTP API

code-coverage go-doc

The 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.

Where is model, extraction, and text?

The model packages has been moved to prometheus/common/model.

The extraction and text packages are now contained in prometheus/common/expfmt.

Contributing and community

See the contributing guidelines and the Community section of the homepage.