Repository navigation
Releases: prometheus/client_golang
Release list
v1.25.0
api/prometheus/v1 (see the [CHANGE] entries below).
1.25.0 / 2026-10-07
- [CHANGE] Minimum required Go version is now 1.26, only the two latest Go versions (1.26 and 1.27) are supported from now on. #2138
- [CHANGE] api/prometheus/v1:
Query,QueryRange,Series,LabelNames, andLabelValuesnow returnInfosannotations in addition toWarnings, matching the Prometheus server's info annotations. This changes the signatures of these methods and ofapi.Client'sDo/DoGetFallback; custom API client implementations must be updated. #1963 - [CHANGE] api/prometheus/v1: Rework
TSDBBlocksresult types to align with the Prometheus server'stsdb.BlockMeta:TSDBBlocksResultnow containsBlocks []TSDBBlockMetadirectly instead of mirroring the full API envelope, nested types are renamed (TSDBBlockMeta,TSDBBlockStats,TSDBBlockMetaCompaction), stat fields areuint64withomitemptytags, and the optional compactionparentsfield is included. #1928 - [FEATURE] testutil: Add
GatherAndFormatto encode a subset of metrics from a Gatherer. #2091 - [FEATURE] promhttp: Add
HandlerOpts.AcceptedFormatsto customize the formats negotiated from the incomingAcceptheader, enabling opt-in to experimental formats such as OpenMetrics 2.0 without changing default negotiation. #2146 - [ENHANCEMENT] promhttp: Negotiated metrics responses now include a
Varyheader. #2142 - [ENHANCEMENT] prometheus: Regenerate the default runtime collector metrics for Go 1.25 and Go 1.26. #2090, #2095
- [ENHANCEMENT] testutil: Finalize OpenMetrics output in
GatherAndFormatandCollectAndFormat(terminating# EOF). #2125 - [BUGFIX] api: Match complete URL path placeholders only; a
:fooargument no longer substitutes inside:foobar. #2136 - [BUGFIX] exp/api/remote: Reset the pooled buffer before generic proto marshaling, preventing corrupted remote-write payloads. #2139
- [BUGFIX] testutil/promlint: Fix "mibi" unit prefix to "mebi". #2135
What's changed
What's Changed
- fix: Remove unneeded and broken CI badge by @bwplotka in #2057
- Synchronize common files from prometheus/prometheus by @prombot in #2060
- build(deps): bump the codeql group with 4 updates by @dependabot[bot] in #2066
- build(deps): bump github.com/klauspost/compress from 1.19.0 to 1.19.1 by @dependabot[bot] in #2071
- build(deps): bump golang.org/x/sys from 0.46.0 to 0.47.0 in the golang-org-x group across 1 directory by @dependabot[bot] in #2069
- build(deps): bump github.com/klauspost/compress from 1.19.0 to 1.19.1 in /exp by @dependabot[bot] in #2072
- build(deps): bump github.com/prometheus/common from 0.69.0 to 0.70.1 in /exp by @dependabot[bot] in #2073
- build(deps): bump github.com/prometheus/common from 0.69.0 to 0.70.1 by @dependabot[bot] in #2070
- build(deps): bump google.golang.org/grpc from 1.79.3 to 1.82.1 in /tutorials/whatsup by @dependabot[bot] in #2075
- Pin GitHub Actions by @SuperQ in #2074
- build(deps): bump actions/checkout from 7.0.0 to 7.0.1 by @dependabot[bot] in #2067
- promhttp: fix panic on requests with nil URL by @SAY-5 in #2065
- Return info annotations in addition to warnings in the API by @zenador in #1963
- build(deps): bump ossf/scorecard-action from 2.4.3 to 2.4.4 by @dependabot[bot] in #2082
- Synchronize common files from prometheus/prometheus by @prombot in #2084
- Synchronize common files from prometheus/prometheus by @prombot in #2086
- Synchronize common files from prometheus/prometheus by @prombot in #2088
- Regenerate Go collector runtime metrics for Go 1.25 and Go 1.26 by @bwplotka in #2090
- go.mod: remove obsolete exclude rule by @thaJeztah in #2077
- Synchronize common files from prometheus/prometheus by @prombot in #2093
- README: document the OpenTelemetry OTLP push bridge by @mvanhorn in #1987
- docs: add AGENTS.md contributor and maintainer guide by @bwplotka in #2056
- testutil: add GatherAndFormat helper by @wieghx in #2091
- build(deps): bump the codeql group with 4 updates by @dependabot[bot] in #2101
- build(deps): bump google.golang.org/protobuf from 1.36.11 to 1.36.12 by @dependabot[bot] in #2097
- build(deps): bump github.com/klauspost/compress from 1.19.1 to 1.19.2 by @dependabot[bot] in #2098
- build(deps): bump google.golang.org/protobuf from 1.36.11 to 1.36.12 in /exp by @dependabot[bot] in #2099
- build(deps): bump github.com/klauspost/compress from 1.19.1 to 1.19.2 in /exp by @dependabot[bot] in #2100
- build(deps): bump github.com/prometheus/procfs from 0.21.1 to 0.22.0 in the prometheus group across 1 directory by @dependabot[bot] in #2096
- build(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 in /tutorials/whatsup by @dependabot[bot] in #2102
- chore: Update metrics for new Go version by @github-actions[bot] in #2095
- Benchmark json-iter, stdlib json and json/v2 by @liggitt in #2107
- build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 in /tutorials/whatsup by @dependabot[bot] in #2112
- RuleGroup: use stdlib for json decoding, optimize decoding by @liggitt in #2109
- Modernize micro benchmarks: b.Loop and key=value case names by @radianceded in #2114
- QueryResult: use stdlib for envelope decoding by @liggitt in #2110
- Use stdlib to decode apiResult envelope by @liggitt in #2111
- Improve linting by @SuperQ in #2115
- Delete unused custom json-iterator marshaling by @liggitt in #2121
- Simplify apiClientImpl#Do error path by @liggitt in #2120
- testutil: finalize OpenMetrics output by @ajavanma in #2125
- build(deps): bump go.opentelemetry.io/otel/sdk from 1.44.0 to 1.45.0 in /tutorials/whatsup by @dependabot[bot] in #2124
- Synchronize common files from prometheus/prometheus by @prombot in #2116
- prometheus: fix revive indent-error-flow lint on Darwin by @bwplotka in #2131
- build(deps): bump go.opentelemetry.io/otel/exporters/otlp/otlptrace from 1.34.0 to 1.45.0 in /tutorials/whatsup by @dependabot[bot] in #2123
- Combine envelope/inner apiResponse decoding, switch to stdlib json by @liggitt in #2118
- build(deps): bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.34.0 to 1.45.0 in /tutorials/whatsup by @dependabot[bot] in #2122
- testutil/promlint: fix "mibi" unit prefix to "mebi" by @ZainnQureshii in #2135
- all: update prometheus/common to v0.72.0 and apply modernize fixes by @bwplotka in #2138
- limit json-iterator use to Go 1.26 by @liggitt in #2128
- promhttp: add AcceptedFormats option to customize format negotiation by @bwplotka in #2146
- build(deps): bump github.com/klauspost/compress from 1.19.2 to 1.20.1 by @dependabot[bot] in #2143
- build(deps): bump the codeql group with 4 updates by @dependabot[bot] in #2145
- build(deps): bump github.com/klauspost/compress from 1.19.2 to 1.20.1 in /exp by @dependabot[bot] in #2144
- promhttp: vary negotiated metrics responses by @lowgame in #2142
- exp/api/remote: reset pooled buffer before generic marshal by @lowgame in #2139
- api: match complete URL placeholders by @lowgame in #2136
- fix: updates for tsdb blocks handling by @tjhop in #1928
- prometheus: fix modernize lint fi...
v1.25.0-rc.0
api/prometheus/v1 (see the [CHANGE] entries below).
1.25.0-rc.0 / 2026-10-05
- [CHANGE] Minimum required Go version is now 1.26, only the two latest Go versions (1.26 and 1.27) are supported from now on. #2138
- [CHANGE] api/prometheus/v1:
Query,QueryRange,Series,LabelNames, andLabelValuesnow returnInfosannotations in addition toWarnings, matching the Prometheus server's info annotations. This changes the signatures of these methods and ofapi.Client'sDo/DoGetFallback; custom API client implementations must be updated. #1963 - [CHANGE] api/prometheus/v1: Rework
TSDBBlocksresult types to align with the Prometheus server'stsdb.BlockMeta:TSDBBlocksResultnow containsBlocks []TSDBBlockMetadirectly instead of mirroring the full API envelope, nested types are renamed (TSDBBlockMeta,TSDBBlockStats,TSDBBlockMetaCompaction), stat fields areuint64withomitemptytags, and the optional compactionparentsfield is included. #1928 - [FEATURE] testutil: Add
GatherAndFormatto encode a subset of metrics from a Gatherer. #2091 - [FEATURE] promhttp: Add
HandlerOpts.AcceptedFormatsto customize the formats negotiated from the incomingAcceptheader, enabling opt-in to experimental formats such as OpenMetrics 2.0 without changing default negotiation. #2146 - [ENHANCEMENT] promhttp: Negotiated metrics responses now include a
Varyheader. #2142 - [ENHANCEMENT] prometheus: Regenerate the default runtime collector metrics for Go 1.25 and Go 1.26. #2090, #2095
- [ENHANCEMENT] testutil: Finalize OpenMetrics output in
GatherAndFormatandCollectAndFormat(terminating# EOF). #2125 - [BUGFIX] api: Match complete URL path placeholders only; a
:fooargument no longer substitutes inside:foobar. #2136 - [BUGFIX] exp/api/remote: Reset the pooled buffer before generic proto marshaling, preventing corrupted remote-write payloads. #2139
- [BUGFIX] testutil/promlint: Fix "mibi" unit prefix to "mebi". #2135
What's changed
What's Changed
- fix: Remove unneeded and broken CI badge by @bwplotka in #2057
- Synchronize common files from prometheus/prometheus by @prombot in #2060
- build(deps): bump the codeql group with 4 updates by @dependabot[bot] in #2066
- build(deps): bump github.com/klauspost/compress from 1.19.0 to 1.19.1 by @dependabot[bot] in #2071
- build(deps): bump golang.org/x/sys from 0.46.0 to 0.47.0 in the golang-org-x group across 1 directory by @dependabot[bot] in #2069
- build(deps): bump github.com/klauspost/compress from 1.19.0 to 1.19.1 in /exp by @dependabot[bot] in #2072
- build(deps): bump github.com/prometheus/common from 0.69.0 to 0.70.1 in /exp by @dependabot[bot] in #2073
- build(deps): bump github.com/prometheus/common from 0.69.0 to 0.70.1 by @dependabot[bot] in #2070
- build(deps): bump google.golang.org/grpc from 1.79.3 to 1.82.1 in /tutorials/whatsup by @dependabot[bot] in #2075
- Pin GitHub Actions by @SuperQ in #2074
- build(deps): bump actions/checkout from 7.0.0 to 7.0.1 by @dependabot[bot] in #2067
- promhttp: fix panic on requests with nil URL by @SAY-5 in #2065
- Return info annotations in addition to warnings in the API by @zenador in #1963
- build(deps): bump ossf/scorecard-action from 2.4.3 to 2.4.4 by @dependabot[bot] in #2082
- Synchronize common files from prometheus/prometheus by @prombot in #2084
- Synchronize common files from prometheus/prometheus by @prombot in #2086
- Synchronize common files from prometheus/prometheus by @prombot in #2088
- Regenerate Go collector runtime metrics for Go 1.25 and Go 1.26 by @bwplotka in #2090
- go.mod: remove obsolete exclude rule by @thaJeztah in #2077
- Synchronize common files from prometheus/prometheus by @prombot in #2093
- README: document the OpenTelemetry OTLP push bridge by @mvanhorn in #1987
- docs: add AGENTS.md contributor and maintainer guide by @bwplotka in #2056
- testutil: add GatherAndFormat helper by @wieghx in #2091
- build(deps): bump the codeql group with 4 updates by @dependabot[bot] in #2101
- build(deps): bump google.golang.org/protobuf from 1.36.11 to 1.36.12 by @dependabot[bot] in #2097
- build(deps): bump github.com/klauspost/compress from 1.19.1 to 1.19.2 by @dependabot[bot] in #2098
- build(deps): bump google.golang.org/protobuf from 1.36.11 to 1.36.12 in /exp by @dependabot[bot] in #2099
- build(deps): bump github.com/klauspost/compress from 1.19.1 to 1.19.2 in /exp by @dependabot[bot] in #2100
- build(deps): bump github.com/prometheus/procfs from 0.21.1 to 0.22.0 in the prometheus group across 1 directory by @dependabot[bot] in #2096
- build(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.1 in /tutorials/whatsup by @dependabot[bot] in #2102
- chore: Update metrics for new Go version by @github-actions[bot] in #2095
- Benchmark json-iter, stdlib json and json/v2 by @liggitt in #2107
- build(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 in /tutorials/whatsup by @dependabot[bot] in #2112
- RuleGroup: use stdlib for json decoding, optimize decoding by @liggitt in #2109
- Modernize micro benchmarks: b.Loop and key=value case names by @radianceded in #2114
- QueryResult: use stdlib for envelope decoding by @liggitt in #2110
- Use stdlib to decode apiResult envelope by @liggitt in #2111
- Improve linting by @SuperQ in #2115
- Delete unused custom json-iterator marshaling by @liggitt in #2121
- Simplify apiClientImpl#Do error path by @liggitt in #2120
- testutil: finalize OpenMetrics output by @ajavanma in #2125
- build(deps): bump go.opentelemetry.io/otel/sdk from 1.44.0 to 1.45.0 in /tutorials/whatsup by @dependabot[bot] in #2124
- Synchronize common files from prometheus/prometheus by @prombot in #2116
- prometheus: fix revive indent-error-flow lint on Darwin by @bwplotka in #2131
- build(deps): bump go.opentelemetry.io/otel/exporters/otlp/otlptrace from 1.34.0 to 1.45.0 in /tutorials/whatsup by @dependabot[bot] in #2123
- Combine envelope/inner apiResponse decoding, switch to stdlib json by @liggitt in #2118
- build(deps): bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc from 1.34.0 to 1.45.0 in /tutorials/whatsup by @dependabot[bot] in #2122
- testutil/promlint: fix "mibi" unit prefix to "mebi" by @ZainnQureshii in #2135
- all: update prometheus/common to v0.72.0 and apply modernize fixes by @bwplotka in #2138
- limit json-iterator use to Go 1.26 by @liggitt in #2128
- promhttp: add AcceptedFormats option to customize format negotiation by @bwplotka in #2146
- build(deps): bump github.com/klauspost/compress from 1.19.2 to 1.20.1 by @dependabot[bot] in #2143
- build(deps): bump the codeql group with 4 updates by @dependabot[bot] in #2145
- build(deps): bump github.com/klauspost/compress from 1.19.2 to 1.20.1 in /exp by @dependabot[bot] in #2144
- promhttp: vary negotiated metrics responses by @lowgame in #2142
- exp/api/remote: reset pooled buffer before generic marshal by @lowgame in #2139
- api: match complete URL placeholders by @lowgame in #2136
- fix: updates for tsdb blocks handling by @tjhop in #1928
- prometheus: fix modernize li...
v1.24.1 / 2026-07-23
Small bugfix release for promhttp.
What's Changed
[BUGFIX] promhttp: Fix panic on requests with nil URL. #2065
Full Changelog: v1.24.0...v1.24.1
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
All commits
- build(deps): bump github.com/prometheus/procfs from 0.16.1 to 0.17.0 by @dependabot[bot] in #1839
- build(deps): bump golang.org/x/sys from 0.33.0 to 0.34.0 by @dependabot[bot] in #1838
- prometheus/collectors: use godoc link for runtime/metrics supported metrics by @xieyuschen in #1844
- Fix doc typo by @torrca in #1849
- Merge release-1.23 into main by @vesari in #1851
- build(deps): bump github/codeql-action from 3.29.2 to 3.29.5 in the github-actions group by @dependabot[bot] in #1852
- Refactor LabelNames to return model.LabelNames type for consistency by @yshngg in #1850
- remote: simplified Store interface; renamed Handler to WriteHandler by @bwplotka in #1855
- feat(api/prometheus): add format_query endpoint for query formatting by @yshngg in #1846
- feat(api): add FormatQuery method to Prometheus v1 API by @yshngg in #1856
- Support matchers in rules API by @jotak in #1843
- Use prometheus/common.expfmt.NewTextParser by @aknuds1 in #1859
- Merge release-1.23 into main by @aknuds1 in #1861
- chore: Drop support for <go1.22 by @mrueg in #1862
- collectors/version: Allow custom additional labels by @mrueg in #1860
- build(deps): bump github.com/prometheus/common from 0.65.0 to 0.66.0 by @ywwg in #1865
- Sync release-1.23 into main by @aknuds1 in #1868
- Sync main with release-1.23 by @aknuds1 in #1871
- chore: clean up golangci-lint configuration by @mmorel-35 in #1802
- build(deps): bump google.golang.org/protobuf from 1.36.8 to 1.36.9 by @dependabot[bot] in #1880
- build(deps): bump google.golang.org/protobuf from 1.36.6 to 1.36.9 in /exp by @dependabot[bot] in #1882
- build(deps): bump github.com/prometheus/common from 0.65.0 to 0.66.1 in /exp by @dependabot[bot] in #1883
- build(deps): bump the github-actions group with 4 updates by @dependabot[bot] in #1881
- Fix typo in remote api err msg by @SungJin1212 in #1878
- chore: Update metrics for new Go version by @github-actions[bot] in #1864
- Add RetryCallBack to remote_api.go by @pipiland2612 in #1888
- bug(remote_write): Fix compression buffer pooling by @fpetkovski in #1889
- Change RetryCallBack initialized by @pipiland2612 in #1890
- Fix CI bug by @pipiland2612 in #1892
- Use cloned http.DefaultTransport. issue-1857 by @karthikkondapally in #1885
- Public backoff config to allow usage of WithAPIBackoff by @pipiland2612 in #1895
- Clarify exp library stability by @pipiland2612 in #1894
- feat: add support for
/status/tsdb/blocksendpoint by @tjhop in #1896 - minor refactor of replaceInvalidRune() in bridge.go by @karthikkondapally in #1897
- build(deps): bump github.com/prometheus/procfs from 0.17.0 to 0.19.2 by @dependabot[bot] in #1903
- build(deps): bump github.com/klauspost/compress from 1.18.0 to 1.18.1 by @dependabot[bot] in #1906
- build(deps): bump golang.org/x/sys from 0.35.0 to 0.37.0 by @dependabot[bot] in #1904
- build(deps): bump github.com/prometheus/common from 0.66.1 to 0.67.2 by @dependabot[bot] in #1907
- build(deps): bump github.com/klauspost/compress from 1.18.0 to 1.18.1 in /exp by @dependabot[bot] in #1911
- build(deps): bump google.golang.org/protobuf from 1.36.9 to 1.36.10 in /exp by @dependabot[bot] in #1909
- build(deps): bump github.com/prometheus/common from 0.66.1 to 0.67.2 in /exp by @dependabot[bot] in #1910
- build(deps): bump the github-actions group with 2 updates by @dependabot[bot] in #1908
- chore(ci): Add CRLF detection and fix targets to prevent CRLF contamination by @kakkoyun in #1898
- chore(ci): Use stable names for CI steps by @kakkoyun in #1914
- build(deps): bump github.com/klauspost/compress from 1.18.1 to 1.18.2 by @dependabot[bot] in https://github.com/prometheus/client_golan...
v1.24.0-rc.0 - 2026-07-17
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
All commits
- build(deps): bump github.com/prometheus/procfs from 0.16.1 to 0.17.0 by @dependabot[bot] in #1839
- build(deps): bump golang.org/x/sys from 0.33.0 to 0.34.0 by @dependabot[bot] in #1838
- prometheus/collectors: use godoc link for runtime/metrics supported metrics by @xieyuschen in #1844
- Fix doc typo by @torrca in #1849
- Merge release-1.23 into main by @vesari in #1851
- build(deps): bump github/codeql-action from 3.29.2 to 3.29.5 in the github-actions group by @dependabot[bot] in #1852
- Refactor LabelNames to return model.LabelNames type for consistency by @yshngg in #1850
- remote: simplified Store interface; renamed Handler to WriteHandler by @bwplotka in #1855
- feat(api/prometheus): add format_query endpoint for query formatting by @yshngg in #1846
- feat(api): add FormatQuery method to Prometheus v1 API by @yshngg in #1856
- Support matchers in rules API by @jotak in #1843
- Use prometheus/common.expfmt.NewTextParser by @aknuds1 in #1859
- Merge release-1.23 into main by @aknuds1 in #1861
- chore: Drop support for <go1.22 by @mrueg in #1862
- collectors/version: Allow custom additional labels by @mrueg in #1860
- build(deps): bump github.com/prometheus/common from 0.65.0 to 0.66.0 by @ywwg in #1865
- Sync release-1.23 into main by @aknuds1 in #1868
- Sync main with release-1.23 by @aknuds1 in #1871
- chore: clean up golangci-lint configuration by @mmorel-35 in #1802
- build(deps): bump google.golang.org/protobuf from 1.36.8 to 1.36.9 by @dependabot[bot] in #1880
- build(deps): bump google.golang.org/protobuf from 1.36.6 to 1.36.9 in /exp by @dependabot[bot] in #1882
- build(deps): bump github.com/prometheus/common from 0.65.0 to 0.66.1 in /exp by @dependabot[bot] in #1883
- build(deps): bump the github-actions group with 4 updates by @dependabot[bot] in #1881
- Fix typo in remote api err msg by @SungJin1212 in #1878
- chore: Update metrics for new Go version by @github-actions[bot] in #1864
- Add RetryCallBack to remote_api.go by @pipiland2612 in #1888
- bug(remote_write): Fix compression buffer pooling by @fpetkovski in #1889
- Change RetryCallBack initialized by @pipiland2612 in #1890
- Fix CI bug by @pipiland2612 in #1892
- Use cloned http.DefaultTransport. issue-1857 by @karthikkondapally in #1885
- Public backoff config to allow usage of WithAPIBackoff by @pipiland2612 in #1895
- Clarify exp library stability by @pipiland2612 in #1894
- feat: add support for
/status/tsdb/blocksendpoint by @tjhop in #1896 - minor refactor of replaceInvalidRune() in bridge.go by @karthikkondapally in #1897
- build(deps): bump github.com/prometheus/procfs from 0.17.0 to 0.19.2 by @dependabot[bot] in #1903
- build(deps): bump github.com/klauspost/compress from 1.18.0 to 1.18.1 by @dependabot[bot] in #1906
- build(deps): bump golang.org/x/sys from 0.35.0 to 0.37.0 by @dependabot[bot] in #1904
- build(deps): bump github.com/prometheus/common from 0.66.1 to 0.67.2 by @dependabot[bot] in #1907
- build(deps): bump github.com/klauspost/compress from 1.18.0 to 1.18.1 in /exp by @dependabot[bot] in #1911
- build(deps): bump google.golang.org/protobuf from 1.36.9 to 1.36.10 in /exp by @dependabot[bot] in #1909
- build(deps): bump github.com/prometheus/common from 0.66.1 to 0.67.2 in /exp by @dependabot[bot] in #1910
- build(deps): bump the github-actions group with 2 updates by @dependabot[bot] in #1908
- chore(ci): Add CRLF detection and fix targets to prevent CRLF contamination by @kakkoyun in #1898
- chore(ci): Use stable names for CI steps by @kakkoyun in #1914
- build(deps): bump github.com/klauspost/compress from 1.18.1 to 1.18.2 by @dependabot[bot] in https://github.com/prometheus/client_golan...
v1.23.2 - 2025-09-05
This release is made to upgrade to prometheus/common v0.66.1, which drops the dependencies github.com/grafana/regexp and go.uber.org/atomic and replaces gopkg.in/yaml.v2 with go.yaml.in/yaml/v2 (a drop-in replacement). There are no functional changes.
All Changes
Full Changelog: v1.23.1...v1.23.2
v1.23.1 - 2025-09-04
This release is made to be compatible with a backwards incompatible API change in prometheus/common v0.66.0. There are no functional changes.
All Changes
Full Changelog: v1.23.0...v1.23.1
v1.23.0 - 2025-07-30
- [CHANGE] Minimum required Go version is now 1.23, only the two latest Go versions are supported from now on. #1812
- [FEATURE] Add WrapCollectorWith and WrapCollectorWithPrefix #1766
- [FEATURE] Add exemplars for native histograms #1686
- [ENHANCEMENT] exp/api: Bubble up status code from writeResponse #1823
- [ENHANCEMENT] collector/go: Update runtime metrics for Go v1.23 and v1.24 #1833
- [BUGFIX] exp/api: client prompt return on context cancellation #1729
All Changes
* Update example test by @SuperQ in https://github.com//pull/1770 * build(deps): bump golang.org/x/net from 0.34.0 to 0.36.0 in /tutorials/whatsup by @dependabot[bot] in https://github.com//pull/1776 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1771 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1778 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1779 * build(deps): bump google.golang.org/protobuf from 1.36.5 to 1.36.6 in /exp by @dependabot[bot] in https://github.com//pull/1782 * build(deps): bump github.com/prometheus/common from 0.62.0 to 0.63.0 in /exp by @dependabot[bot] in https://github.com//pull/1781 * build(deps): bump github.com/prometheus/common from 0.62.0 to 0.63.0 by @dependabot[bot] in https://github.com//pull/1783 * build(deps): bump google.golang.org/protobuf from 1.36.5 to 1.36.6 by @dependabot[bot] in https://github.com//pull/1784 * build(deps): bump github.com/prometheus/procfs from 0.15.1 to 0.16.0 by @dependabot[bot] in https://github.com//pull/1786 * chore: Upgrade golangci-lint to v2 by @kakkoyun in https://github.com//pull/1789 * build(deps): bump the github-actions group across 1 directory with 3 updates by @dependabot[bot] in https://github.com//pull/1790 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1791 * Add `WrapCollectorWith` and `WrapCollectorWithPrefix` by @colega in https://github.com//pull/1766 * feat(github-actions): add Go file change detection to golangci-lint workflow by @kakkoyun in https://github.com//pull/1794 * chore(ci): Fix flaky tests by @kakkoyun in https://github.com//pull/1795 * build(deps): bump golang.org/x/net from 0.36.0 to 0.38.0 in /tutorials/whatsup by @dependabot[bot] in https://github.com//pull/1799 * test(registry): Add goleak-based goroutine leak detection by @surinkim in https://github.com//pull/1797 * build(deps): bump go.uber.org/goleak from 1.2.0 to 1.3.0 by @dependabot[bot] in https://github.com//pull/1806 * build(deps): bump the github-actions group with 2 updates by @dependabot[bot] in https://github.com//pull/1804 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1809 * Add exemplars for native histograms by @shivanthzen in https://github.com//pull/1686 * build(deps): bump golang.org/x/sys from 0.30.0 to 0.32.0 by @dependabot[bot] in https://github.com//pull/1807 * build(deps): bump github.com/prometheus/client_model from 0.6.1 to 0.6.2 by @dependabot[bot] in https://github.com//pull/1805 * build(deps): bump github.com/prometheus/procfs from 0.16.0 to 0.16.1 by @dependabot[bot] in https://github.com//pull/1808 * build(deps): bump golang.org/x/net from 0.35.0 to 0.38.0 by @dependabot[bot] in https://github.com//pull/1800 * Update supported Go versions by @SuperQ in https://github.com//pull/1812 * Cleaup Go modules by @SuperQ in https://github.com//pull/1813 * fix: client prompt return on context cancellation by @umegbewe in https://github.com//pull/1729 * Simplify buf binary install by @SuperQ in https://github.com//pull/1814 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1815 * build(deps): bump the github-actions group with 5 updates by @dependabot[bot] in https://github.com//pull/1817 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1821 * exp/api: Bubble up status code from writeResponse by @saswatamcode in https://github.com//pull/1823 * build(deps): bump github.com/prometheus/common from 0.64.0 to 0.65.0 by @dependabot[bot] in https://github.com//pull/1827 * build(deps): bump github.com/prometheus/common from 0.64.0 to 0.65.0 in /exp by @dependabot[bot] in https://github.com//pull/1828 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1831 * Update runtime metrics for Go v1.23 and v1.24 by @aknuds1 in https://github.com//pull/1833 * Fix `errNotImplemented` reference by @aknuds1 in https://github.com//pull/1835 * build(deps): bump the github-actions group with 3 updates by @dependabot[bot] in https://github.com//pull/1826 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1832 * Cut v1.23.0-rc.0 by @vesari in https://github.com//pull/1837 * cut v1.23.0-rc.1 by @vesari in https://github.com//pull/1842New Contributors
- @surinkim made their first contribution in #1797
- @umegbewe made their first contribution in #1729
- @aknuds1 made their first contribution in #1833
Full Changelog: v1.22.0...v1.23.0
v1.23.0-rc.1 - 2025-07-15
- [CHANGE] Minimum required Go version is now 1.23, only the two latest Go versions are supported from now on. #1812
- [FEATURE] Add WrapCollectorWith and WrapCollectorWithPrefix #1766
- [FEATURE] Add exemplars for native histograms #1686
- [ENHANCEMENT] exp/api: Bubble up status code from writeResponse #1823
- [ENHANCEMENT] collector/go: Update runtime metrics for Go v1.23 and v1.24 #1833
- [BUGFIX] exp/api: client prompt return on context cancellation #1729
All Changes
* Update example test by @SuperQ in https://github.com//pull/1770 * build(deps): bump golang.org/x/net from 0.34.0 to 0.36.0 in /tutorials/whatsup by @dependabot[bot] in https://github.com//pull/1776 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1771 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1778 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1779 * build(deps): bump google.golang.org/protobuf from 1.36.5 to 1.36.6 in /exp by @dependabot[bot] in https://github.com//pull/1782 * build(deps): bump github.com/prometheus/common from 0.62.0 to 0.63.0 in /exp by @dependabot[bot] in https://github.com//pull/1781 * build(deps): bump github.com/prometheus/common from 0.62.0 to 0.63.0 by @dependabot[bot] in https://github.com//pull/1783 * build(deps): bump google.golang.org/protobuf from 1.36.5 to 1.36.6 by @dependabot[bot] in https://github.com//pull/1784 * build(deps): bump github.com/prometheus/procfs from 0.15.1 to 0.16.0 by @dependabot[bot] in https://github.com//pull/1786 * chore: Upgrade golangci-lint to v2 by @kakkoyun in https://github.com//pull/1789 * build(deps): bump the github-actions group across 1 directory with 3 updates by @dependabot[bot] in https://github.com//pull/1790 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1791 * Add `WrapCollectorWith` and `WrapCollectorWithPrefix` by @colega in https://github.com//pull/1766 * feat(github-actions): add Go file change detection to golangci-lint workflow by @kakkoyun in https://github.com//pull/1794 * chore(ci): Fix flaky tests by @kakkoyun in https://github.com//pull/1795 * build(deps): bump golang.org/x/net from 0.36.0 to 0.38.0 in /tutorials/whatsup by @dependabot[bot] in https://github.com//pull/1799 * test(registry): Add goleak-based goroutine leak detection by @surinkim in https://github.com//pull/1797 * build(deps): bump go.uber.org/goleak from 1.2.0 to 1.3.0 by @dependabot[bot] in https://github.com//pull/1806 * build(deps): bump the github-actions group with 2 updates by @dependabot[bot] in https://github.com//pull/1804 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1809 * Add exemplars for native histograms by @shivanthzen in https://github.com//pull/1686 * build(deps): bump golang.org/x/sys from 0.30.0 to 0.32.0 by @dependabot[bot] in https://github.com//pull/1807 * build(deps): bump github.com/prometheus/client_model from 0.6.1 to 0.6.2 by @dependabot[bot] in https://github.com//pull/1805 * build(deps): bump github.com/prometheus/procfs from 0.16.0 to 0.16.1 by @dependabot[bot] in https://github.com//pull/1808 * build(deps): bump golang.org/x/net from 0.35.0 to 0.38.0 by @dependabot[bot] in https://github.com//pull/1800 * Update supported Go versions by @SuperQ in https://github.com//pull/1812 * Cleaup Go modules by @SuperQ in https://github.com//pull/1813 * fix: client prompt return on context cancellation by @umegbewe in https://github.com//pull/1729 * Simplify buf binary install by @SuperQ in https://github.com//pull/1814 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1815 * build(deps): bump the github-actions group with 5 updates by @dependabot[bot] in https://github.com//pull/1817 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1821 * exp/api: Bubble up status code from writeResponse by @saswatamcode in https://github.com//pull/1823 * build(deps): bump github.com/prometheus/common from 0.64.0 to 0.65.0 by @dependabot[bot] in https://github.com//pull/1827 * build(deps): bump github.com/prometheus/common from 0.64.0 to 0.65.0 in /exp by @dependabot[bot] in https://github.com//pull/1828 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1831 * Update runtime metrics for Go v1.23 and v1.24 by @aknuds1 in https://github.com//pull/1833 * Fix `errNotImplemented` reference by @aknuds1 in https://github.com//pull/1835 * build(deps): bump the github-actions group with 3 updates by @dependabot[bot] in https://github.com//pull/1826 * Synchronize common files from prometheus/prometheus by @prombot in https://github.com//pull/1832 * Cut v1.23.0-rc.0 by @vesari in https://github.com//pull/1837 * cut v1.23.0-rc.1 by @vesari in https://github.com//pull/1842New Contributors
- @surinkim made their first contribution in #1797
- @umegbewe made their first contribution in #1729
- @aknuds1 made their first contribution in #1833
Full Changelog: v1.22.0...v1.23.0-rc.1
v1.22.0 - 2025-04-07
zstd support introduce in #1496
Experimental support for zstd on scrape was added, controlled by the request Accept-Encoding header.
It was enabled by default since version 1.20, but now you need to add a blank import to enable it.
The decision to make it opt-in by default was originally made because the Go standard library was expected to have default zstd support added soon,
golang/go#62513 however, the work took longer than anticipated and it will be postponed to upcoming major Go versions.
e.g.:
import ( _ "github.com/prometheus/client_golang/prometheus/promhttp/zstd" )
- [FEATURE] prometheus: Add new CollectorFunc utility #1724
- [CHANGE] Minimum required Go version is now 1.22 (we also test client_golang against latest go version - 1.24) #1738
- [FEATURE] api:
WithLookbackDeltaandWithStatsoptions have been added to API client. #1743 - [CHANGE]
⚠️ promhttp: Isolate zstd support and klauspost/compress library use to promhttp/zstd package. #1765
All Changes
- build(deps): bump golang.org/x/sys from 0.28.0 to 0.29.0 by @dependabot in #1720
- build(deps): bump google.golang.org/protobuf from 1.36.1 to 1.36.3 by @dependabot in #1719
- Update RELEASE.md by @bwplotka in #1721
- chore(docs): Add links for the upstream PRs by @kakkoyun in #1722
- Added tips on releasing client and checking with k8s. by @bwplotka in #1723
- feat: Add new CollectorFunc utility by @Saumya40-codes in #1724
- build(deps): bump google.golang.org/protobuf from 1.36.3 to 1.36.4 by @dependabot in #1725
- build(deps): bump the github-actions group with 5 updates by @dependabot in #1726
- Synchronize common files from prometheus/prometheus by @prombot in #1727
- Synchronize common files from prometheus/prometheus by @prombot in #1731
- build(deps): bump golang.org/x/sys from 0.29.0 to 0.30.0 by @dependabot in #1739
- build(deps): bump google.golang.org/protobuf from 1.36.4 to 1.36.5 by @dependabot in #1740
- Cleanup dependabot config by @SuperQ in #1741
- Upgrade Golang version v1.24 by @dongjiang1989 in #1738
- build(deps): bump the github-actions group with 2 updates by @dependabot in #1742
- Merging 1.21 release back to main. by @bwplotka in #1744
- Synchronize common files from prometheus/prometheus by @prombot in #1745
- Add support for undocumented query options for API by @mahendrapaipuri in #1743
- exp/api: Add experimental exp module; Add remote API with write client and handler. by @bwplotka in #1658
- exp/api: Add accepted msg type validation to handler by @saswatamcode in #1750
- build(deps): bump the github-actions group with 5 updates by @dependabot in #1751
- build(deps): bump github.com/klauspost/compress from 1.17.11 to 1.18.0 by @dependabot in #1752
- build(deps): bump github.com/google/go-cmp from 0.6.0 to 0.7.0 by @dependabot in #1753
- exp: Reset snappy buf by @saswatamcode in #1756
- Merge release 1.21.1 to main. by @bwplotka in #1762
- exp: Add dependabot config by @saswatamcode in #1754
- build(deps): bump peter-evans/create-pull-request from 7.0.7 to 7.0.8 in the github-actions group by @dependabot in #1764
- promhttp: Isolate zstd support and klauspost/compress library use to promhttp/zstd package by @liggitt in #1765
- Cut 1.22.0-rc.0 by @kakkoyun in #1768
New Contributors
- @Saumya40-codes made their first contribution in #1724
- @mahendrapaipuri made their first contribution in #1743
- @liggitt made their first contribution in #1765
Full Changelog: v1.21.1...v1.22.0-rc.0