Registry / observability / m3db-prometheus-client-golang

m3db-prometheus-client-golang

JSON →
library1.12.8gogounverified

A fork of the Prometheus Go client library used by M3DB for metrics exposition.

go get github.com/m3db/prometheus_client_golang
INSTALL
IMPORT
SIG · M3DB-PROMETHEUS-CL
M
m3db-prometheus-client-golang
observabilitygov1.12.8
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/m3db/prometheus_client_golang/prometheus

Registers a counter and exposes metrics via HTTP.

package main import ( "net/http" "github.com/m3db/prometheus_client_golang/prometheus" "github.com/m3db/prometheus_client_golang/prometheus/promhttp" ) func main() { counter := prometheus.NewCounter(prometheus.CounterOpts{Name: "test"}) prometheus.MustRegister(counter) http.Handle("/metrics", promhttp.Handler()) http.ListenAndServe(":8080", nil) }
Debug
Known issues
gotchaThis is a fork; may diverge from upstream Prometheus client.
fix
Use the official prometheus/client_golang unless you need M3DB-specific changes.
affects: all
Upgrade
Version history
1.12.8latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

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