# hashicorp/go-metrics

A Golang library for exporting performance and runtime metrics to external metrics systems (i.e. statsite, statsd)

Repository: https://github.com/hashicorp/go-metrics
Canonical: https://ross.abutalabs.com/products/hashicorp-go-metrics
Language: Go
License: MIT
License Family: permissive
Last push: 2026-08-17T07:34:20+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 63, longevity 100
- inputs: {"age_days": 4772, "days_push": 16, "days_rel": 35, "gap_med": 283.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1578, forks 189 (observed 2026-08-28T04:05:06.688215+00:00)

## What it is
A Go library for instrumenting code and exporting performance and runtime metrics to external metrics systems. It supports multiple sinks including StatsD, statsite, Prometheus, and in-memory aggregation via a flexible MetricSink interface.

## Use cases
- instrument go application metrics
- export metrics to statsd
- expose prometheus metrics endpoint from go service
- profile runtime performance of a go app
- aggregate metrics in memory for debugging
- filter high-cardinality metric labels
- dump recent metrics on a signal for debugging

## When to choose
- you need lightweight metrics instrumentation in a Go application
- you want pluggable sinks including StatsD, statsite, and Prometheus
- you need label filtering to control metric cardinality

## When to avoid
- you need a full observability suite with tracing and logging
- you are not using Go
- you need OpenTelemetry-compatible instrumentation

## Facets
- artifact type: library
- maturity: stable
- function: monitoring, analytics
- domain: monitoring, developer-tools, backend
- platform: go, cross-platform
- tags: metrics, statsd, statsite, prometheus, instrumentation, observability, devops

## Member repositories
- hashicorp/go-metrics (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:06.688215+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:56:55.283274+00:00, confidence not recorded.
  - readme: https://github.com/hashicorp/go-metrics (fetched 2026-08-28T04:05:06.688215+00:00, sha 178d1ebe9999)
- Data as of 2026-08-30T08:39:29.467469+00:00.
