Registry / observability / prometheus-client-golang

prometheus-client-golang

JSON →
library1.23.2gogounverified

Prometheus instrumentation library for Go applications.

go get github.com/prometheus/client_golang
INSTALL
IMPORT
SIG · PROMETHEUS-CLIENT-
P
prometheus-client-golang
observabilitygov1.23.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

prometheus
✓ github.com/prometheus/client_golang/prometheus

Register and use a Prometheus counter

package main import ( "github.com/prometheus/client_golang/prometheus" ) var ( requestsTotal = prometheus.NewCounter(prometheus.CounterOpts{ Name: "http_requests_total", Help: "Total number of HTTP requests.", }) ) func init() { prometheus.MustRegister(requestsTotal) } func main() { requestsTotal.Inc() }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.23.2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
2
Resources
prometheus-client-golang — go get prometheus-client-golang · libregistry