47 lines
2.4 KiB
Markdown
47 lines
2.4 KiB
Markdown
# Prometheus Go client library
|
|
|
|
[](https://travis-ci.org/prometheus/client_golang)
|
|
[](https://goreportcard.com/report/github.com/prometheus/client_golang)
|
|
|
|
This is the [Go](http://golang.org) client library for
|
|
[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.
|
|
|
|
## Instrumenting applications
|
|
|
|
[](http://gocover.io/github.com/prometheus/client_golang/prometheus) [](https://godoc.org/github.com/prometheus/client_golang/prometheus)
|
|
|
|
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.
|
|
|
|
The
|
|
[`examples` directory](https://github.com/prometheus/client_golang/tree/master/examples)
|
|
contains simple examples of instrumented code.
|
|
|
|
## Client for the Prometheus HTTP API
|
|
|
|
[](http://gocover.io/github.com/prometheus/client_golang/api/prometheus) [](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
|
|
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`](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).
|
|
|
|
## Contributing and community
|
|
|
|
See the [contributing guidelines](CONTRIBUTING.md) and the
|
|
[Community section](http://prometheus.io/community/) of the homepage.
|