Prometheus instrumentation library for Go applications
Go to file
Alex Salt 301aa8906b /api/v1/rules: alert value as string (#585)
Signed-off-by: Alexander Saltykov <alexander-s@yandex-team.ru>
2019-05-28 13:57:09 +02:00
.github Release v0.9.0 2018-10-15 13:28:28 +02:00
api /api/v1/rules: alert value as string (#585) 2019-05-28 13:57:09 +02:00
examples Move both examples into single Dockerfile for Docker Hub (fixes #347) 2018-07-09 19:09:06 +01:00
prometheus Merge pull request #588 from prometheus/beorn7/test 2019-05-26 23:20:33 +02:00
.gitignore Create Docker images for the examples 2017-09-19 13:59:05 +01:00
.golangci.yml Add .golangci.yml 2019-04-25 10:38:07 +02:00
.travis.yml Increase minimum required Go version to 1.9 2019-04-28 23:28:57 +02:00
CHANGELOG.md Cut v0.9.3 2019-05-16 18:07:07 +02:00
CONTRIBUTING.md Mention the DCO in the contributing guide 2018-05-31 14:22:30 +00:00
Dockerfile Using the recommended label syntax for maintainer in Dockerfile. 2018-08-27 08:28:47 -07:00
LICENSE License cleanup 2015-01-22 16:13:15 +01:00
MAINTAINERS.md Make Krasi the maintainer for the HTTP API client 2018-06-06 13:14:29 +02:00
Makefile Update Makefile.common 2019-03-13 09:43:07 +01:00
Makefile.common makefile: update Makefile.common with newer version 2019-05-15 00:00:42 +00:00
NOTICE Create a public registry interface and separate out HTTP exposition 2016-08-02 18:46:22 +02:00
README.md Update versioning plan with Go Modules in mind 2019-05-16 18:05:52 +02:00
VERSION Cut v0.9.3 2019-05-16 18:07:07 +02:00
go.mod Switch from encoding/json -> jsoniter (#570) 2019-05-28 13:45:06 +02:00
go.sum Switch from encoding/json -> jsoniter (#570) 2019-05-28 13:45:06 +02:00

README.md

Prometheus Go client library

Build Status Go Report Card go-doc

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.9 or later.

Important note about releases, versioning, tagging, and stability

In this repository, we used to mostly ignore the many coming and going dependency management tools for Go and instead wait for a tool that most of the community would converge on. Our bet is that this tool has arrived now in the form of Go Modules.

To make full use of what Go Modules are offering, the previous versioning roadmap for this repository had to be changed. In particular, Go Modules finally provide a way for incompatible versions of the same package to coexist in the same binary. For that, however, the versions must be tagged with different major versions of 1 or greater (following Semantic Versioning). Thus, we decided to abandon the original plan of introducing a lot of breaking changes before releasing v1 of this repository, mostly driven by the widespread use this repository already has and the relatively stable state it is in.

To leverage the mechanism Go Modules offers for a transition between major version, the current plan is the following:

  • The v0.9.x series of releases will see a small number of bugfix releases to deal with a few remaining minor issues (#543, #542, #539).
  • After that, all features currently marked as deprecated will be removed, and the result will be released as v1.0.0.
  • The planned breaking changes previously gathered as part of the v0.10 milestone will now go into the v2 milestone. The v2 development happens in a separate branch for the time being. v2 releases off that branch will happen once sufficient stability is reached. v1 and v2 will coexist for a while to enable a convenient transition.
  • The API client in prometheus/client_golang/api/… is still considered experimental. While it will be tagged alongside the rest of the code according to the plan above, we cannot strictly guarantee semver semantics for it.

Instrumenting applications

code-coverage go-doc

The prometheus directory contains the instrumentation library. See the guide on the Prometheus website 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.