Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Prometheus instrumentation library for Go applications

License

NotificationsYou must be signed in to change notification settings

notrobpike/client_golang

 
 

CIGo Report CardGo ReferenceSlack

This is theGo client library forPrometheus. It has two separate parts, one forinstrumenting application code, and one for creating clients that talk to thePrometheus HTTP API.

This library requires Go1.20 or later.

The library mandates the use of Go1.20 or subsequent versions. While it has demonstrated functionality with versions as old as Go 1.17, our commitment remains to offer support and rectifications for only the most recent three major releases.

Important note about releases and stability

This repository generally followsSemanticVersioning. However, the API client inprometheus/client_golang/api/… is still considered experimental. Breakingchanges of the API client willnot trigger a new major release. The same istrue for selected other new features explicitly marked asEXPERIMENTAL inCHANGELOG.md.

Features that require breaking changes in the stable parts of the repositoryare being batched up and tracked in thev2milestone. The v2development happens in aseparatebranch for the timebeing. v2 releases off that branch will happen once sufficient stability isreached. In view of the widespread use of this repository, v1 and v2 willcoexist for a while to enable a convenient transition.

Instrumenting applications

Go Reference

Theprometheus directorycontains the instrumentation library. See theguide on the Prometheuswebsite to learn more about instrumenting applications.

Theexamples directorycontains simple examples of instrumented code.

Client for the Prometheus HTTP API

Go Reference

Theapi/prometheus directorycontains the client for thePrometheus HTTP API. It allows youto write Go applications that query time series data from a Prometheusserver. It is still in alpha stage.

Where ismodel,extraction, andtext?

Themodel packages has been moved toprometheus/common/model.

Theextraction andtext packages are now contained inprometheus/common/expfmt.

Contributing and community

See thecontributing guidelines and theCommunity section of the homepage.

client_golang community is also present on the CNCF Slack#prometheus-client_golang.

For Maintainers: Release Process

To cut a minor version:

  1. Create a new branchrelease-<major>.<minor> on top of themain commit you want to cut the version from and push it.
  2. Create a new branch on top of the release branch, e.g.<yourname>/cut-<major>.<minor>.<patch>,
  3. Change theVERSION file.
  4. UpdateCHANGELOG (only user-impacting changes to mention).
  5. Create PR, and get it reviewed.
  6. Once merged, create a release with therelease-<major>.<minor> tag on GitHub with the<version> title.
  7. Announce on the prometheus-announce mailing list, slack and Twitter.
  8. Merge the release branch back to themain using the "merge without squashing" approach (!).

NOTE: In case of merge conflicts, you can checkout the release branch in a new branch, e.g.<yourname>/resolve-conflicts, fix the merge problems there, and then do a PR into main from the new branch. In that way, you still get all the commits in the release branch back intomain, but leave the release branch alone.

To cut the patch version:

  1. Create a branch on top of the release branch you want to use.
  2. Cherry-pick the fixes from themain branch (or add new commits) to fix critical bugs for that patch release.
  3. Follow steps 3-8 as above.

About

Prometheus instrumentation library for Go applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go99.6%
  • Other0.4%

[8]ページ先頭

©2009-2025 Movatter.jp