Browse Source

Add note about Prometheus as a library (#10594)

* Add note about Prometheus as a library

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
pull/10602/head
Julien Pivotto 3 years ago committed by GitHub
parent
commit
624967fdbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 31
      README.md

31
README.md

@ -122,6 +122,37 @@ You can build a docker image locally with the following commands:
*NB* if you are on a Mac, you will need [gnu-tar](https://formulae.brew.sh/formula/gnu-tar).
## Using Prometheus as a Go Library
### Remote Write
We are publishing our Remote Write protobuf independently at
[buf.build](https://buf.build/prometheus/prometheus/assets).
You can use that as a library:
```shell
$ go get go.buf.build/protocolbuffers/go/prometheus/prometheus
```
This is experimental.
### Prometheus code base
In order to comply with [go mod](https://go.dev/ref/mod#versions) rules,
Prometheus release number do not exactly match Go module releases. For the
Prometheus v2.y.z releases, we are publishing equivalent v0.y.z tags.
Therefore, a user that would want to use Prometheus v2.35.0 as a library could do:
```
$ go get github.com/prometheus/prometheus@v0.35.0
```
This solution makes it clear that we might break our internal Go APIs between
minor user-facing releases, as [breaking changes are allowed in major version
zero](https://semver.org/#spec-item-4).
## React UI Development
For more information on building, running, and developing on the new React-based UI, see the React app's [README.md](web/ui/README.md).

Loading…
Cancel
Save