finds.dev← search

// the find

prometheus/client_golang

★ 6,040 · Go · Apache-2.0 · updated Oct 2026

Prometheus instrumentation library for Go applications

The official Go client library for Prometheus, used to instrument application code with counters, gauges, histograms, and summaries, plus expose a /metrics endpoint. It's for anyone running Go services who wants Prometheus-style metrics, and increasingly for OTel users too since it can bridge to OTLP push instead of only pull-based scraping.

promauto wraps metric registration so you can't forget MustRegister, which kills a whole class of silent 'metric never shows up' bugs. Native histograms with exponential bucket schemes mean you don't have to hand-pick bucket boundaries like you did with classic histograms. promhttp handles content negotiation and compression (gzip/zstd) for the scrape endpoint, and the Go collector gives you GC/runtime stats for free just by importing the package.

The HTTP API client (api/prometheus/v1) has been 'alpha' for years and is explicitly exempt from semver - breaking changes there don't trigger a major release, so pin a commit hash if you depend on it. A real v2 has been talked about via a milestone and a dev-v2 branch for a long time with no ship date, so early API warts (like label cardinality footguns baked into the vec types) are effectively permanent in v1. Push-based workflows (batch jobs, serverless) are second-class - you're routed through either Pushgateway or the newer OTLP bridge, and the README itself says pull-based promhttp is still the recommended default.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →