Update README.md

This commit is contained in:
beorn7 2015-09-18 14:41:53 +02:00
parent dcd7417a58
commit 75109d1c90
1 changed files with 29 additions and 10 deletions

View File

@ -1,24 +1,43 @@
# Prometheus Go client library # Prometheus Go client library
[![Build Status](https://travis-ci.org/prometheus/client_golang.svg?branch=master)](https://travis-ci.org/prometheus/client_golang) [![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) [![Build Status](https://travis-ci.org/prometheus/client_golang.svg?branch=master)](https://travis-ci.org/prometheus/client_golang)
This is the [Go](http://golang.org) client library for This is the [Go](http://golang.org) client library for
[Prometheus](http://prometheus.io). [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 ## Instrumenting applications
For instrumenting your Go application code with Prometheus metrics, see the [![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)
[documentation of the exposition client](https://godoc.org/github.com/prometheus/client_golang/prometheus).
## Consuming exported metrics 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.
If you want to process metrics exported by a Prometheus client, see the The
[consumption library documentation](https://godoc.org/github.com/prometheus/client_golang/extraction). [`examples` directory](https://github.com/prometheus/client_golang/tree/master/examples)
(The Prometheus server is using that library.) contains simple examples of instrumented code.
# Testing ## Client for the Prometheus HTTP API
$ go test ./... [![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
to write Go applications that query time series data from a Prometheus server.
## 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 ## Contributing and community