OSS TanbouSign in with GitHub

instrument Go applications with counters, gauges, and histograms for Prometheus

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
6,037
Primary language
Go
License
Apache-2.0
Repository last updated
Oct 5, 2026
On this page

Overview

prometheus/client_golang is the official Prometheus client library for Go applications. It provides Counter, Gauge, Histogram, Summary, and custom Collector instrumentation plus promhttp handlers for scrape endpoints. A separate package also implements a Prometheus HTTP API client.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Instrument application state with metric types and collectors

Counters, gauges, histograms, summaries, and custom collectors can be registered to expose request counts, latency, queue depth, and other runtime data in the Prometheus model.

Sources: [2]

Expose scrape endpoints with promhttp and query Prometheus through its HTTP API

The instrumentation library includes HTTP handlers for Prometheus scraping, while the api/prometheus package provides a client for querying Prometheus HTTP APIs.

Sources: [2]

Best fit

Fits Go services standardizing metrics on the Prometheus/OpenMetrics ecosystem

It is useful for APIs, workers, and batch processes feeding runtime metrics into Prometheus and downstream dashboards or alerting systems.

Sources: [2]

Before adoption

v1.24.1 declares Go 1.25 and experimental surfaces are not fully protected by SemVer

The v1.24.1 go.mod declares Go 1.25, and the README supports the two most recent major Go releases. Experimental surfaces such as the HTTP API client may make breaking changes without a major version bump. Version 1.24.1 also fixes a promhttp panic on requests with a nil URL.

Sources: [3][2][4]

Official sources

  1. [1]prometheus/client_golang — GitHub repository(2026-10-06)
  2. [2]client_golang v1.24.1 — README(2026-10-06)
  3. [3]client_golang v1.24.1 — go.mod(2026-10-06)
  4. [4]client_golang v1.24.1 release(2026-10-06)
  5. [5]client_golang Apache-2.0 license(2026-10-06)
Supplemental curator note

This is the standard Go client for exposing Prometheus metrics. Metric-label cardinality and collector lifecycle directly affect operational cost, so keep label values bounded and make registration and HTTP-handler wiring explicit during application startup.

Try it in 3 steps

  1. 1

    Get the source

    git clone --depth 1 https://github.com/prometheus/client_golang.git
  2. 2

    Enter the repository

    cd client_golang
  3. 3

    Check the official steps

    Continue with the commands in the README Installation, Quick Start, or Getting Started section.

    find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Check the official README

Growth

Growth trends · Last 30 days

6,037 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
56
Open PRs
55

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data
Stars
6,037
Forks
1,325
Watchers
71
Open issues
89
Contributors
250
Owner type
Organization
Primary language
Go
License
Apache-2.0
Repository last updated
Oct 5, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?