Sourced from github.com/prometheus/client_golang's releases.
v1.22.0 - 2025-04-07
:warning: This release contains potential breaking change if you use experimental
zstd
support introduce in #1496 :warning:Experimental support for
zstd
on scrape was added, controlled by the requestAccept-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:
WithLookbackDelta
andWithStats
options have been added to API client. #1743- [CHANGE] :warning: promhttp: Isolate zstd support and klauspost/compress library use to promhttp/zstd package. #1765
- build(deps): bump golang.org/x/sys from 0.28.0 to 0.29.0 by
@dependabot
in prometheus/client_golang#1720- build(deps): bump google.golang.org/protobuf from 1.36.1 to 1.36.3 by
@dependabot
in prometheus/client_golang#1719- Update RELEASE.md by
@bwplotka
in prometheus/client_golang#1721- chore(docs): Add links for the upstream PRs by
@kakkoyun
in prometheus/client_golang#1722- Added tips on releasing client and checking with k8s. by
@bwplotka
in prometheus/client_golang#1723- feat: Add new CollectorFunc utility by
@Saumya40-codes
in prometheus/client_golang#1724- build(deps): bump google.golang.org/protobuf from 1.36.3 to 1.36.4 by
@dependabot
in prometheus/client_golang#1725- build(deps): bump the github-actions group with 5 updates by
@dependabot
in prometheus/client_golang#1726- Synchronize common files from prometheus/prometheus by
@prombot
in prometheus/client_golang#1727- Synchronize common files from prometheus/prometheus by
@prombot
in prometheus/client_golang#1731- build(deps): bump golang.org/x/sys from 0.29.0 to 0.30.0 by
@dependabot
in prometheus/client_golang#1739- build(deps): bump google.golang.org/protobuf from 1.36.4 to 1.36.5 by
@dependabot
in prometheus/client_golang#1740- Cleanup dependabot config by
@SuperQ
in prometheus/client_golang#1741- Upgrade Golang version v1.24 by
@dongjiang1989
in prometheus/client_golang#1738- build(deps): bump the github-actions group with 2 updates by
@dependabot
in prometheus/client_golang#1742- Merging 1.21 release back to main. by
@bwplotka
in prometheus/client_golang#1744- Synchronize common files from prometheus/prometheus by
@prombot
in prometheus/client_golang#1745- Add support for undocumented query options for API by
@mahendrapaipuri
in prometheus/client_golang#1743- exp/api: Add experimental exp module; Add remote API with write client and handler. by
@bwplotka
in prometheus/client_golang#1658- exp/api: Add accepted msg type validation to handler by
@saswatamcode
in prometheus/client_golang#1750- build(deps): bump the github-actions group with 5 updates by
@dependabot
in prometheus/client_golang#1751- build(deps): bump github.com/klauspost/compress from 1.17.11 to 1.18.0 by
@dependabot
in prometheus/client_golang#1752- build(deps): bump github.com/google/go-cmp from 0.6.0 to 0.7.0 by
@dependabot
in prometheus/client_golang#1753- exp: Reset snappy buf by
@saswatamcode
in prometheus/client_golang#1756- Merge release 1.21.1 to main. by
@bwplotka
in prometheus/client_golang#1762- exp: Add dependabot config by
@saswatamcode
in prometheus/client_golang#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 prometheus/client_golang#1764
... (truncated)
Sourced from github.com/prometheus/client_golang's changelog.
1.22.0 / 2025-04-07
:warning: This release contains potential breaking change if you use experimental
zstd
support introduce in #1496 :warning:Experimental support for
zstd
on scrape was added, controlled by the requestAccept-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:
WithLookbackDelta
andWithStats
options have been added to API client. #1743- [CHANGE] :warning: promhttp: Isolate zstd support and klauspost/compress library use to promhttp/zstd package. #1765
1.21.1 / 2025-03-04
- [BUGFIX] prometheus: Revert of
Inc
,Add
andObserve
cumulative metric CAS optimizations (#1661), causing regressions on low contention cases.- [BUGFIX] prometheus: Fix GOOS=ios build, broken due to process_collector_* wrong build tags.
1.21.0 / 2025-02-17
:warning: This release contains potential breaking change if you upgrade
github.com/prometheus/common
to 0.62+ together with client_golang. :warning:New common version changes
model.NameValidationScheme
global variable, which relaxes the validation of label names and metric name, allowing all UTF-8 characters. Typically, this should not break any user, unless your test or usage expects strict certain names to panic/fail on client_golang metric registration, gathering or scrape. In case of problems changemodel.NameValidationScheme
to oldmodel.LegacyValidation
value in your projectinit
function.
- [BUGFIX] gocollector: Fix help message for runtime/metric metrics. #1583
- [BUGFIX] prometheus: Fix
Desc.String()
method for no labels case. #1687- [ENHANCEMENT] prometheus: Optimize popular
prometheus.BuildFQName
function; now up to 30% faster. #1665- [ENHANCEMENT] prometheus: Optimize
Inc
,Add
andObserve
cumulative metrics; now up to 50% faster under high concurrent contention. #1661- [CHANGE] Upgrade prometheus/common to 0.62.0 which changes
model.NameValidationScheme
global variable. #1712- [CHANGE] Add support for Go 1.23. #1602
- [FEATURE] process_collector: Add support for Darwin systems. #1600 #1616 #1625 #1675 #1715
- [FEATURE] api: Add ability to invoke
CloseIdleConnections
on api.Client usingapi.Client.(CloseIdler).CloseIdleConnections()
casting. #1513- [FEATURE] promhttp: Add
promhttp.HandlerOpts.EnableOpenMetricsTextCreatedSamples
option to create OpenMetrics _created lines. Not recommended unless you want to use opt-in Created Timestamp feature. Community works on OpenMetrics 2.0 format that should make those lines obsolete (they increase cardinality significantly). #1408- [FEATURE] prometheus: Add
NewConstNativeHistogram
function. #1654
d50be25
Cut 1.22.0 (#1793)1043db7
Cut 1.22.0-rc.0 (#1768)e575c9c
promhttp: Isolate zstd support and klauspost/compress library use to
promhttp...f2276aa
Merge pull request #1764
from prometheus/dependabot/github_actions/github-act...9df772c
build(deps): bump peter-evans/create-pull-requesta3548c5
Merge pull request #1754
from saswatamcode/exp-eh60fd2b0
Remove go.work file for now8f9d0de
exp: Add dependabot configc5cf981
Merge pull request #1762
from prometheus/release-1.218a42da3
Fix ios build. (#1758)