2015-06-13 02:58:51 +03:00
|
|
|
# Prometheus Go client library
|
2012-05-20 01:59:25 +04:00
|
|
|
|
2015-09-18 15:41:53 +03:00
|
|
|
[![Build Status](https://travis-ci.org/prometheus/client_golang.svg?branch=master)](https://travis-ci.org/prometheus/client_golang)
|
2016-09-16 20:59:04 +03:00
|
|
|
[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/client_golang)](https://goreportcard.com/report/github.com/prometheus/client_golang)
|
2012-05-20 01:59:25 +04:00
|
|
|
|
2015-06-13 02:58:51 +03:00
|
|
|
This is the [Go](http://golang.org) client library for
|
2015-09-18 15:41:53 +03:00
|
|
|
[Prometheus](http://prometheus.io). It has two separate parts, one for
|
|
|
|
instrumenting application code, and one for creating clients that talk to the
|
|
|
|
Prometheus HTTP API.
|
2012-05-20 01:59:25 +04:00
|
|
|
|
2015-06-13 02:58:51 +03:00
|
|
|
## Instrumenting applications
|
2013-03-28 13:44:20 +04:00
|
|
|
|
2015-09-18 15:41:53 +03:00
|
|
|
[![code-coverage](http://gocover.io/_badge/github.com/prometheus/client_golang/prometheus)](http://gocover.io/github.com/prometheus/client_golang/prometheus) [![go-doc](https://godoc.org/github.com/prometheus/client_golang/prometheus?status.svg)](https://godoc.org/github.com/prometheus/client_golang/prometheus)
|
2015-06-13 02:58:51 +03:00
|
|
|
|
2015-09-18 15:41:53 +03:00
|
|
|
The
|
|
|
|
[`prometheus` directory](https://github.com/prometheus/client_golang/tree/master/prometheus)
|
|
|
|
contains the instrumentation library. See the
|
|
|
|
[best practices section](http://prometheus.io/docs/practices/naming/) of the
|
|
|
|
Prometheus documentation to learn more about instrumenting applications.
|
2015-06-13 02:58:51 +03:00
|
|
|
|
2015-09-18 15:41:53 +03:00
|
|
|
The
|
|
|
|
[`examples` directory](https://github.com/prometheus/client_golang/tree/master/examples)
|
|
|
|
contains simple examples of instrumented code.
|
2013-03-28 13:44:20 +04:00
|
|
|
|
2015-09-18 15:41:53 +03:00
|
|
|
## Client for the Prometheus HTTP API
|
2013-02-18 08:09:21 +04:00
|
|
|
|
2015-09-18 15:41:53 +03:00
|
|
|
[![code-coverage](http://gocover.io/_badge/github.com/prometheus/client_golang/api/prometheus)](http://gocover.io/github.com/prometheus/client_golang/api/prometheus) [![go-doc](https://godoc.org/github.com/prometheus/client_golang/api/prometheus?status.svg)](https://godoc.org/github.com/prometheus/client_golang/api/prometheus)
|
|
|
|
|
|
|
|
The
|
|
|
|
[`api/prometheus` directory](https://github.com/prometheus/client_golang/tree/master/api/prometheus)
|
|
|
|
contains the client for the
|
|
|
|
[Prometheus HTTP API](http://prometheus.io/docs/querying/api/). It allows you
|
2017-02-16 20:55:22 +03:00
|
|
|
to write Go applications that query time series data from a Prometheus
|
|
|
|
server. It is still in alpha stage.
|
2015-09-18 15:41:53 +03:00
|
|
|
|
|
|
|
## Where is `model`, `extraction`, and `text`?
|
|
|
|
|
|
|
|
The `model` packages has been moved to
|
|
|
|
[`prometheus/common/model`](https://github.com/prometheus/common/tree/master/model).
|
|
|
|
|
|
|
|
The `extraction` and `text` packages are now contained in
|
|
|
|
[`prometheus/common/expfmt`](https://github.com/prometheus/common/tree/master/expfmt).
|
2014-04-25 14:50:18 +04:00
|
|
|
|
2015-06-13 02:58:51 +03:00
|
|
|
## Contributing and community
|
2014-04-25 14:50:18 +04:00
|
|
|
|
2015-06-13 02:58:51 +03:00
|
|
|
See the [contributing guidelines](CONTRIBUTING.md) and the
|
|
|
|
[Community section](http://prometheus.io/community/) of the homepage.
|