Sourced from github.com/prometheus/client_golang's releases.
v1.24.0 - 2026-07-20
Changes
- [CHANGE] Minimum required Go version is now 1.25, only the two latest Go versions (1.25 and 1.26) are supported from now on. #1862
- [CHANGE] prometheus: Name validation now always uses the UTF-8 scheme instead of the deprecated
model.NameValidationSchemeglobal. Default behavior is unchanged; code that setNameValidationScheme = LegacyValidationno longer gets legacy enforcement at metric, label, and push-grouping construction. #2051- [CHANGE] api/prometheus/v1: Support matchers (
matches[]parameter) inRulesmethod (Rules(ctx context.Context, matches []string) (RulesResult, error)). #1843- [CHANGE] api/prometheus/v1: Refactor
LabelNamesmethod to returnmodel.LabelNamesinstead of[]stringfor consistency across the API. #1850- [CHANGE] exp/api/remote: Simplify
Storeinterface, renameHandlertoWriteHandler, and encapsulate write response handling. #1855- [FEATURE] prometheus: Add new Go 1.26 runtime metrics (
/sched/goroutines-created:goroutines,/sched/goroutines/not-in-go:goroutines,/sched/goroutines/runnable:goroutines,/sched/goroutines/running:goroutines,/sched/goroutines/waiting:goroutines,/sched/threads/total:threads). #1942- [FEATURE] prometheus: Add
WithUnit(unit string)option and explicit OpenMetrics unit support inCounterOpts,GaugeOpts,SummaryOpts, andHistogramOpts. #1392- [FEATURE] prometheus: Expose descriptor construction error through public
Err()method onDesc. #1902- [FEATURE] promhttp: Add opt-in
HandlerOpts.CoalesceGatherto deduplicate concurrentGathercalls so overlapping scrapes share one collection cycle, preventing goroutine pile-up when the scrape rate outpaces collection time. #1969- [FEATURE] promhttp: HTTP handlers created by
promhttppackage now support metrics filtering by providing one or morename[]query parameters. The default behavior when none are provided remains the same, returning all metrics. #1925- [FEATURE] api/prometheus/v1: Add query formatting endpoint support (
/format_query) andFormatQuery(ctx context.Context, query string) (string, error)method. #1846, #1856- [FEATURE] api/prometheus/v1: Add support for
/status/tsdb/blocksendpoint viaTSDBBlocks(ctx context.Context) ([]TSDBBlock, error)method. #1896- [FEATURE] exp/api/remote: Export
BackoffConfigto allow customization when usingWithAPIBackoff. #1895- [FEATURE] exp/api/remote: Add
RetryCallBackto allow custom logging or handling on retry attempts in the remote write client. #1888, #1890- [ENHANCEMENT] prometheus/collectors/version: Allow specifying custom labels when registering the version collector. #1860
- [ENHANCEMENT] api: Use cloned
http.DefaultTransportwhen constructing default HTTP clients to prevent accidental mutations of shared global transport state. #1885- [BUGFIX] prometheus: Recover from collector panics during
Gather()and return an error instead of crashing the process. #1961- [BUGFIX] prometheus: Fix
cpu-secondsunit suffix handling for metricgo_cpu_classes_gc_mark_assist_cpu_seconds. #1991- [BUGFIX] promhttp:
InstrumentHandlerDurationandInstrumentHandlerCounterno longer panic when given an observer/counter that does not implementExemplarObserver/ExemplarAdder(e.g. aSummaryVec). The exemplar is dropped and the value is recorded via the plainObserve/Addpath, matching the safe-cast already used byTimer.ObserveDurationWithExemplar. #2005- [BUGFIX] api/prometheus/v1: Fall back to
GETrequests whenPOSTrequests return403 Forbiddenor method not allowed. #2030- [BUGFIX] api: Respect context cancellation inside
httpClient.Do. #1971- [BUGFIX] exp/api/remote: Fix compression buffer pooling where compressed buffers were released prematurely, causing corrupted remote-write payloads. #1889
- [BUGFIX] exp/api/remote: Reject malformed snappy payloads declaring huge decoded sizes. Enforce a 32MB decoded-size limit to prevent OOM from oversized remote-write requests. #1917
- [BUGFIX] exp/api/remote: Ensure remote write v2 headers cannot be returned on v1 requests. #1927
- build(deps): bump github.com/prometheus/procfs from 0.16.1 to 0.17.0 by
@dependabot[bot] in prometheus/client_golang#1839- build(deps): bump golang.org/x/sys from 0.33.0 to 0.34.0 by
@dependabot[bot] in prometheus/client_golang#1838- prometheus/collectors: use godoc link for runtime/metrics supported metrics by
@xieyuschenin prometheus/client_golang#1844- Fix doc typo by
@torrcain prometheus/client_golang#1849- Merge release-1.23 into main by
@vesariin prometheus/client_golang#1851- build(deps): bump github/codeql-action from 3.29.2 to 3.29.5 in the github-actions group by
@dependabot[bot] in prometheus/client_golang#1852- Refactor LabelNames to return model.LabelNames type for consistency by
@yshnggin prometheus/client_golang#1850- remote: simplified Store interface; renamed Handler to WriteHandler by
@bwplotkain prometheus/client_golang#1855- feat(api/prometheus): add format_query endpoint for query formatting by
@yshnggin prometheus/client_golang#1846- feat(api): add FormatQuery method to Prometheus v1 API by
@yshnggin prometheus/client_golang#1856- Support matchers in rules API by
@jotakin prometheus/client_golang#1843- Use prometheus/common.expfmt.NewTextParser by
@aknuds1in prometheus/client_golang#1859- Merge release-1.23 into main by
@aknuds1in prometheus/client_golang#1861- chore: Drop support for <go1.22 by
@mruegin prometheus/client_golang#1862- collectors/version: Allow custom additional labels by
@mruegin prometheus/client_golang#1860- build(deps): bump github.com/prometheus/common from 0.65.0 to 0.66.0 by
@ywwgin prometheus/client_golang#1865- Sync release-1.23 into main by
@aknuds1in prometheus/client_golang#1868- Sync main with release-1.23 by
@aknuds1in prometheus/client_golang#1871- chore: clean up golangci-lint configuration by
@mmorel-35in prometheus/client_golang#1802
... (truncated)
Sourced from github.com/prometheus/client_golang's changelog.
1.24.0 / 2026-07-20
- [CHANGE] Minimum required Go version is now 1.25, only the two latest Go versions (1.25 and 1.26) are supported from now on. #1862
- [CHANGE] prometheus: Name validation now always uses the UTF-8 scheme instead of the deprecated
model.NameValidationSchemeglobal. Default behavior is unchanged; code that setNameValidationScheme = LegacyValidationno longer gets legacy enforcement at metric, label, and push-grouping construction. #2051- [CHANGE] api/prometheus/v1: Support matchers (
matches[]parameter) inRulesmethod (Rules(ctx context.Context, matches []string) (RulesResult, error)). #1843- [CHANGE] api/prometheus/v1: Refactor
LabelNamesmethod to returnmodel.LabelNamesinstead of[]stringfor consistency across the API. #1850- [CHANGE] exp/api/remote: Simplify
Storeinterface, renameHandlertoWriteHandler, and encapsulate write response handling. #1855- [FEATURE] prometheus: Add new Go 1.26 runtime metrics (
/sched/goroutines-created:goroutines,/sched/goroutines/not-in-go:goroutines,/sched/goroutines/runnable:goroutines,/sched/goroutines/running:goroutines,/sched/goroutines/waiting:goroutines,/sched/threads/total:threads). #1942- [FEATURE] prometheus: Add
WithUnit(unit string)option and explicit OpenMetrics unit support inCounterOpts,GaugeOpts,SummaryOpts, andHistogramOpts. #1392- [FEATURE] prometheus: Expose descriptor construction error through public
Err()method onDesc. #1902- [FEATURE] promhttp: Add opt-in
HandlerOpts.CoalesceGatherto deduplicate concurrentGathercalls so overlapping scrapes share one collection cycle, preventing goroutine pile-up when the scrape rate outpaces collection time. #1969- [FEATURE] promhttp: HTTP handlers created by
promhttppackage now support metrics filtering by providing one or morename[]query parameters. The default behavior when none are provided remains the same, returning all metrics. #1925- [FEATURE] api/prometheus/v1: Add query formatting endpoint support (
/format_query) andFormatQuery(ctx context.Context, query string) (string, error)method. #1846, #1856- [FEATURE] api/prometheus/v1: Add support for
/status/tsdb/blocksendpoint viaTSDBBlocks(ctx context.Context) ([]TSDBBlock, error)method. #1896- [FEATURE] exp/api/remote: Export
BackoffConfigto allow customization when usingWithAPIBackoff. #1895- [FEATURE] exp/api/remote: Add
RetryCallBackto allow custom logging or handling on retry attempts in the remote write client. #1888, #1890- [ENHANCEMENT] prometheus/collectors/version: Allow specifying custom labels when registering the version collector. #1860
- [ENHANCEMENT] api: Use cloned
http.DefaultTransportwhen constructing default HTTP clients to prevent accidental mutations of shared global transport state. #1885- [BUGFIX] prometheus: Recover from collector panics during
Gather()and return an error instead of crashing the process. #1961- [BUGFIX] prometheus: Fix
cpu-secondsunit suffix handling for metricgo_cpu_classes_gc_mark_assist_cpu_seconds. #1991- [BUGFIX] promhttp:
InstrumentHandlerDurationandInstrumentHandlerCounterno longer panic when given an observer/counter that does not implementExemplarObserver/ExemplarAdder(e.g. aSummaryVec). The exemplar is dropped and the value is recorded via the plainObserve/Addpath, matching the safe-cast already used byTimer.ObserveDurationWithExemplar. #2005- [BUGFIX] api/prometheus/v1: Fall back to
GETrequests whenPOSTrequests return403 Forbiddenor method not allowed. #2030- [BUGFIX] api: Respect context cancellation inside
httpClient.Do. #1971- [BUGFIX] exp/api/remote: Fix compression buffer pooling where compressed buffers were released prematurely, causing corrupted remote-write payloads. #1889
- [BUGFIX] exp/api/remote: Reject malformed snappy payloads declaring huge decoded sizes. Enforce a 32MB decoded-size limit to prevent OOM from oversized remote-write requests. #1917
- [BUGFIX] exp/api/remote: Ensure remote write v2 headers cannot be returned on v1 requests. #1927
48dd383
Cut v1.24.0 (#2061)a725305
Cut v1.24.0-rc.0 (#2058)77c584f
build(deps): update all Go dependencies in all go.mod files (#2059)78262a7
feat(promhttp): add CoalesceGather option to deduplicate concurrent
Gather ca...34e9a7f
Merge pull request #2055
from prombot/repo_sync43749bc
Update common Prometheus filesde19217
examples: improve simple main.go example (#1999)20355eb
fix: correct typos in comments and test error messages (#2049)4cd2d3a
test: fix two flaky tests (darwin start_time regex, memstats
HeapReleased dri...b0d896b
Replace deprecated model.NameValidationScheme with explicit
UTF8Validation (#...