github.com/prometheus/client_golang breaking changes
go30 curated breaking changes across major versions of github.com/prometheus/client_golang. Use this as a migration checklist before bumping dependencies.
- 1.23.0 \u2192 1.23.1api
This release is made to be compatible with a backwards incompatible API change in prometheus/common v0.66.0. There are no functional changes.
- 1.21.1 \u2192 1.22.0api
[FEATURE] api: `WithLookbackDelta` and `WithStats` options have been added to API client. #1743
- 1.21.1 \u2192 1.22.0breaking
[FEATURE] prometheus: Add new CollectorFunc utility #1724
- 1.21.1 \u2192 1.22.0breaking
[CHANGE] Minimum required Go version is now 1.22 (we also test client_golang against latest go version - 1.24) #1738
- 1.21.1 \u2192 1.22.0breaking
[CHANGE] :warning: promhttp: Isolate zstd support and klauspost/compress library use to promhttp/zstd package. #1765
- 1.20.5 \u2192 1.21.0api
[FEATURE] api: Add ability to invoke `CloseIdleConnections` on api.Client using `api.Client.(CloseIdler).CloseIdleConnections()` casting. #1513
- 1.20.5 \u2192 1.21.0breaking
[CHANGE] Add support for Go 1.23. #1602
- 1.20.5 \u2192 1.21.0breaking
[FEATURE] process_collector: Add support for Darwin systems. #1600 #1616 #1625 #1675 #1715
- 1.20.5 \u2192 1.21.0breaking
[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
- 1.20.5 \u2192 1.21.0breaking
[FEATURE] prometheus: Add `NewConstNativeHistogram` function. #1654
- 1.20.5 \u2192 1.21.0breaking
[BUGFIX] gocollector: Fix help message for runtime/metric metrics. #1583
- 1.20.5 \u2192 1.21.0breaking
[BUGFIX] prometheus: Fix `Desc.String()` method for no labels case. #1687
- 1.20.5 \u2192 1.21.0breaking
[ENHANCEMENT] prometheus: Optimize popular `prometheus.BuildFQName` function; now up to 30% faster. #1665
- 1.20.5 \u2192 1.21.0breaking
[ENHANCEMENT] prometheus: Optimize `Inc`, `Add` and `Observe` cumulative metrics; now up to 50% faster under high concurrent contention. #1661
- 1.20.5 \u2192 1.21.0breaking
[CHANGE] Upgrade prometheus/common to 0.62.0 which changes `model.NameValidationScheme` global variable. #1712
- 1.12.1 \u2192 1.12.2behavior
[CHANGE] :warning: Change in `collectors.NewGoCollector` metrics: Reverting addition of new ~80 runtime metrics by default. You can enable this back with `GoRuntimeMetricsCollection` option or `GoRuntimeMemStatsCollection | GoRuntimeMetricsCollection` for smooth transition.
- 1.12.1 \u2192 1.12.2behavior
[BUGFIX] Fixed the bug that causes generated histogram metric names to end with `_total`. ⚠️ This changes 3 metric names in the new Go collector that was reverted from default in this release.
- 1.12.1 \u2192 1.12.2breaking
[CHANGE] Added `collectors.WithGoCollections` that allows to choose what collection of Go runtime metrics user wants: Equivalent of [`MemStats` structure](https://pkg.go.dev/runtime#MemStats) configured using `GoRuntimeMemStatsCollection`, new based on dedicated [runtime/metrics](https://pkg.go.dev/runtime/metrics) metrics represented by `GoRuntimeMetricsCollection` option, or both by specifying `GoRuntimeMemStatsCollection | GoRuntimeMetricsCollection` flag. #1031
- 1.12.1 \u2192 1.12.2breaking
`go_gc_heap_allocs_by_size_bytes_total` -> `go_gc_heap_allocs_by_size_bytes`,
- 1.12.1 \u2192 1.12.2breaking
`go_gc_heap_frees_by_size_bytes_total` -> `go_gc_heap_allocs_by_size_bytes`
- 1.12.1 \u2192 1.12.2breaking
`go_gc_pauses_seconds_total` -> `go_gc_pauses_seconds`.
- 1.12.1 \u2192 1.12.2removed
[CHANCE] Removed `-Inf` buckets from new Go Collector histograms.
- 0.9.4 \u2192 1.0.0api
[CHANGE] API client: Pass warnings through on non-error responses. #599
- 0.9.4 \u2192 1.0.0api
[CHANGE] API client: Add warnings to `Series` call. #603
- 0.9.4 \u2192 1.0.0api
[FEATURE] API client: Add `/labels` call. #604
- 0.9.4 \u2192 1.0.0breaking
[BUGFIX] Make `AlreadyRegisteredError` usable for wrapped registries. #607
- 0.9.4 \u2192 1.0.0breaking
[FEATURE] Make process collector work on Microsoft Windows. **EXPERIMENTAL** #596
- 0.9.4 \u2192 1.0.0removed
[CHANGE] Remove objectives from the default `Summary`. (Objectives have to be set explicitly in the `SummaryOpts`.) #600
- 0.9.4 \u2192 1.0.0removed
[CHANGE] Remove all HTTP related feature in the `prometheus` package. (Use the `promhttp` package instead.) #600
- 0.9.4 \u2192 1.0.0removed
[CHANGE] Remove `push.FromGatherer`, `push.AddFromGatherer`, `push.Collectors`. (Use `push.New` instead.) #600
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/breaking/go/github.com/prometheus/client_golang