a2facc3074
Original discussion see https://github.com/prometheus/client_golang/pull/362 . Assuming that the most frequently used method of a `Gauge` is `Set` and the most frequently used method of a `Conuter` is `Inc`, this separates the implementation of both metric types. `Inc` and integral `Add` of a counter is now handled in a separate `uint64`. This would create a race in `Set`, but luckily, there is no `Set` anymore in a counter. All attempts to solve above race (to use the same idea for a `Gauge`) slow down `Set`, So we just stick with the old implementation (formerly `value`) for `Gauge`. |
||
---|---|---|
api | ||
examples | ||
prometheus | ||
.gitignore | ||
.travis.yml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
MAINTAINERS.md | ||
NOTICE | ||
README.md | ||
VERSION |
README.md
Prometheus Go client library
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
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
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.