Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new collectors package #862

Merged
merged 1 commit into from May 10, 2021
Merged

Conversation

johejo
Copy link
Contributor

@johejo johejo commented Apr 24, 2021

Signed-off-by: Mitsuo Heijo mitsuo.heijo@gmail.com

https://groups.google.com/g/prometheus-developers/c/Zexpd_oRYRQ
#848 (comment)

Based on the above discussion, we have added a new collector package.
The destination collectors are now a wrapper for the previous package to avoid circular imports.
I'm not sure if this is a better change.
It seems to me that this changes should be done for v2, not v1.

@beorn7 beorn7 self-requested a review April 26, 2021 21:52
@beorn7
Copy link
Member

beorn7 commented Apr 27, 2021

This is a good change to do before v2. In v2, we'll remove the now deprecated functions. By having the new functions in v1 already, people can gradually migrate over so that it doesn't have to happen as a big bang precisely on upgrading to v2.

I would call the package collectors, not collector. (Otherwise, I'd assume the Collector interface is in the collector package, but that's not the case.)

You also have to disable the lint warnings, see https://github.com/prometheus/client_golang/blob/master/prometheus/promhttp/delegator.go#L86 to get an idea how that works.

@johejo johejo force-pushed the new_collector_package branch 2 times, most recently from 133bd61 to d938323 Compare April 29, 2021 06:13
@johejo johejo marked this pull request as ready for review April 29, 2021 06:42
Copy link
Member

@beorn7 beorn7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general, thank you very much. Just some nits about doc comments, see below.

Also, there is an example for NewExpvarCollector, which should be moved into the new package, too.

// limitations under the License.

// Package collectors provides several collectors that implement
// prometheus.Collector.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a bit of a stutter and doesn't say so much. How about the following:

Package collectors provides implementations of prometheus.Collector to conveniently collect process and Go-related metrics.

import "github.com/prometheus/client_golang/prometheus"

// NewExpvarCollector returns a newly allocated expvar Collector that still has
// to be registered with a Prometheus registry.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The part "that still has to be registered with a Prometheus registry" comes from the days when this was the only collector provided by the library. It has become confusing by now (because it's also true for the other collectors, but we don't say so in their doc comments). Now that it is even in its own package, we should really delete that part.

Comment on lines 56 to 57
// Currently this function is a wrapper for prometheus.NewExpvarCollector to
// prevent cycle imports.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's an implementation detail without any impact for the users of the library. I would not mention it in the doc comment.

Comment on lines 45 to 46
// Currently this function is a wrapper for prometheus.NewGoCollector to
// prevent cycle imports.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove, see above.

Comment on lines 70 to 71
// Currently this function is a wrapper for prometheus.NewGoCollector to
// prevent cycle imports.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove, see above.

Comment on lines 50 to 51
// Currently this function is a wrapper for prometheus.NewProcessCollector to
// prevent cycle imports.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove, see above.

@@ -59,6 +59,8 @@ type expvarCollector struct {
// sample values.
//
// Anything that does not fit into the scheme above is silently ignored.
//
// Deprecated: Use collectors.NewExpvarCollector instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it's best to also remove the whole lengthy doc comment above, e.g.:

// NewExpvarCollector is the obsolete version of collectors.NewExpvarCollector.
// See there for documentation.
//
// Deprecated: Use collectors.NewExpvarCollector instead.

The last line might seem redundant now, but it's important to have it in this format for linters.

Same for the doc comments for the other, now deprecated, functions.

@johejo
Copy link
Contributor Author

johejo commented Apr 30, 2021

Thanks for the review.
Another question, how should ProcessCollectorOpts be migrated?
There are also other option such as type alias.

@johejo johejo changed the title Add new collector package Add new collectors package Apr 30, 2021
@johejo johejo requested a review from beorn7 May 6, 2021 11:38
@beorn7
Copy link
Member

beorn7 commented May 6, 2021

Sorry for the delay. This is on my list. I hope I get to this very soon.

Copy link
Member

@beorn7 beorn7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor thing left.

@@ -383,6 +361,8 @@ type memStatsMetrics []struct {
// This collector uses only the build information for the main module. See
// https://github.com/povilasv/prommod for an example of a collector for the
// module dependencies.
//
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc comment above also needs to be replaced with

// NewBuildInfoCollector is the obsolete version of collectors.NewGoCollector.
// See there for documentation.

@beorn7
Copy link
Member

beorn7 commented May 6, 2021

Another question, how should ProcessCollectorOpts be migrated?
There are also other option such as type alias.

I guess, in general, a type alias is a good idea. However, in this case, we needed to put the alias in the collectors package, again to avoid a circular import chain. So the "real" type with all the doc comments would be in the location where it is deprecated.

I'm also not sure if a type alias would help that much in this particular case. If you use prometheus.NewProcessCollector, you also use prometheus.ProcessCollectorOpts. If you use collectors.NewProcessCollector, you use collectors.ProcessCollectorOpts. So at the time you change the one, you can also change the other.

@johejo johejo force-pushed the new_collector_package branch 4 times, most recently from 80510b9 to 2931a50 Compare May 8, 2021 01:12
Signed-off-by: Mitsuo Heijo <mitsuo.heijo@gmail.com>
@johejo johejo requested a review from beorn7 May 8, 2021 01:55
Copy link
Member

@beorn7 beorn7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much.

And now on to adding your actual new code. (o:

@beorn7 beorn7 merged commit b89620c into prometheus:master May 10, 2021
kodiakhq bot pushed a commit to cloudquery/cloudquery that referenced this pull request Dec 29, 2023
….1 [SECURITY] (#15855)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/prometheus/client_golang](https://togithub.com/prometheus/client_golang) | indirect | minor | `v1.1.0` -> `v1.11.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

### GitHub Vulnerability Alerts

#### [CVE-2022-21698](https://togithub.com/prometheus/client_golang/security/advisories/GHSA-cg3q-j54f-5p7p)

This is the Go client library for Prometheus. It has two separate parts, one for instrumenting application code, and one for creating clients that talk to the Prometheus HTTP API. client_golang is the instrumentation library for Go applications in Prometheus, and the promhttp package in client_golang provides tooling around HTTP servers and clients.

### Impact

HTTP server susceptible to a Denial of Service through unbounded cardinality, and potential memory exhaustion, when handling requests with non-standard HTTP methods.

###  Affected Configuration

In order to be affected, an instrumented software must

* Use any of `promhttp.InstrumentHandler*` middleware except `RequestsInFlight`.
* Do not filter any specific methods (e.g GET) before middleware.
* Pass metric with `method` label name to our middleware.
* Not have any firewall/LB/proxy that filters away requests with unknown `method`.

### Patches

* [prometheus/client_golang#962
* [prometheus/client_golang#987

### Workarounds

If you cannot upgrade to [v1.11.1 or above](https://togithub.com/prometheus/client_golang/releases/tag/v1.11.1), in order to stop being affected you can:

* Remove `method` label name from counter/gauge you use in the InstrumentHandler.
* Turn off affected promhttp handlers.
* Add custom middleware before promhttp handler that will sanitize the request method given by Go http.Request.
* Use a reverse proxy or web application firewall, configured to only allow a limited set of methods.

### For more information

If you have any questions or comments about this advisory:

* Open an issue in https://github.com/prometheus/client_golang
* Email us at `prometheus-team@googlegroups.com`

---

### Release Notes

<details>
<summary>prometheus/client_golang (github.com/prometheus/client_golang)</summary>

### [`v1.11.1`](https://togithub.com/prometheus/client_golang/releases/tag/v1.11.1): 1.11.1 / 2022-02-15

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.11.0...v1.11.1)

-   \[SECURITY FIX] promhttp: Check validity of method and code label values[prometheus/client_golang#987 (Addressed [`CVE-2022-21698`](https://togithub.com/prometheus/client_golang/security/advisories/GHSA-cg3q-j54f-5p7p))

#### What's Changed

-   promhttp: Check validity of method and code label values by [@&#8203;bwplotka](https://togithub.com/bwplotka) and [@&#8203;kakkoyun](https://togithub.com/kakkoyun) in  [prometheus/client_golang#987

**Full Changelog**: prometheus/client_golang@v1.11.0...v1.11.1

### [`v1.11.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.11.0): / 2021-06-07

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.10.0...v1.11.0)

-   \[CHANGE] Add new collectors package. [#&#8203;862](https://togithub.com/prometheus/client_golang/issues/862)
-   \[CHANGE] `prometheus.NewExpvarCollector` is deprecated, use `collectors.NewExpvarCollector` instead. [#&#8203;862](https://togithub.com/prometheus/client_golang/issues/862)
-   \[CHANGE] `prometheus.NewGoCollector` is deprecated, use `collectors.NewGoCollector` instead. [#&#8203;862](https://togithub.com/prometheus/client_golang/issues/862)
-   \[CHANGE] `prometheus.NewBuildInfoCollector` is deprecated, use `collectors.NewBuildInfoCollector` instead. [#&#8203;862](https://togithub.com/prometheus/client_golang/issues/862)
-   \[FEATURE] Add new collector for database/sql#DBStats. [#&#8203;866](https://togithub.com/prometheus/client_golang/issues/866)
-   \[FEATURE] API client: Add exemplars API support. [#&#8203;861](https://togithub.com/prometheus/client_golang/issues/861)
-   \[ENHANCEMENT] API client: Add newer fields to Rules API. [#&#8203;855](https://togithub.com/prometheus/client_golang/issues/855)
-   \[ENHANCEMENT] API client: Add missing fields to Targets API. [#&#8203;856](https://togithub.com/prometheus/client_golang/issues/856)

#### What's Changed

-   Synchronize common files from prometheus/prometheus by [@&#8203;prombot](https://togithub.com/prombot) in [prometheus/client_golang#846
-   Synchronize common files from prometheus/prometheus by [@&#8203;prombot](https://togithub.com/prombot) in [prometheus/client_golang#849
-   Synchronize common files from prometheus/prometheus by [@&#8203;prombot](https://togithub.com/prombot) in [prometheus/client_golang#853
-   Add newer fields to Rules API by [@&#8203;gouthamve](https://togithub.com/gouthamve) in [prometheus/client_golang#855
-   Add missing fields to targets API by [@&#8203;yeya24](https://togithub.com/yeya24) in [prometheus/client_golang#856
-   Synchronize common files from prometheus/prometheus by [@&#8203;prombot](https://togithub.com/prombot) in [prometheus/client_golang#857
-   Add exemplars API support by [@&#8203;yeya24](https://togithub.com/yeya24) in [prometheus/client_golang#861
-   Improve description of MaxAge in summary docs by [@&#8203;Dean-Coakley](https://togithub.com/Dean-Coakley) in [prometheus/client_golang#864
-   Add new collectors package by [@&#8203;johejo](https://togithub.com/johejo) in [prometheus/client_golang#862
-   Add collector for database/sql#DBStats by [@&#8203;johejo](https://togithub.com/johejo) in [prometheus/client_golang#866
-   Make dbStatsCollector more DRY by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#867
-   Change maintainers from [@&#8203;beorn7](https://togithub.com/beorn7) to @&#8203;bwplotka/[@&#8203;kakkoyun](https://togithub.com/kakkoyun) by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#873
-   Document implications of negative observations by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#871
-   Update Go modules by [@&#8203;SuperQ](https://togithub.com/SuperQ) in [prometheus/client_golang#875

#### New Contributors

-   [@&#8203;gouthamve](https://togithub.com/gouthamve) made their first contribution in [prometheus/client_golang#855

**Full Changelog**: prometheus/client_golang@v1.10.0...v1.11.0

### [`v1.10.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.10.0): 1.10.0 / 2021-03-18

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.9.0...v1.10.0)

-   \[CHANGE] Minimum required Go version is now 1.13.
-   \[CHANGE] API client: Add matchers to `LabelNames` and `LabesValues`. [#&#8203;828](https://togithub.com/prometheus/client_golang/issues/828)
-   \[FEATURE] API client: Add buildinfo call. [#&#8203;841](https://togithub.com/prometheus/client_golang/issues/841)
-   \[BUGFIX] Fix build on riscv64. [#&#8203;833](https://togithub.com/prometheus/client_golang/issues/833)

#### What's Changed

-   Add SECURITY.md by [@&#8203;roidelapluie](https://togithub.com/roidelapluie) in [prometheus/client_golang#831
-   Bump prometheus/procfs to 0.3.0 to fix building on riscv64 by [@&#8203;zhsj](https://togithub.com/zhsj) in [prometheus/client_golang#833
-   Fix typo in comments in [prometheus/client_golang#835
-   Support matchers in labels API by [@&#8203;yeya24](https://togithub.com/yeya24) in [prometheus/client_golang#828
-   Add buildinfo method by [@&#8203;ntk148v](https://togithub.com/ntk148v) in [prometheus/client_golang#841
-   Update dependencies by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#843
-   Synchronize common files from prometheus/prometheus by [@&#8203;prombot](https://togithub.com/prombot) in [prometheus/client_golang#844
-   Cut v1.10.0 by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#845

#### New Contributors

-   [@&#8203;zhsj](https://togithub.com/zhsj) made their first contribution in [prometheus/client_golang#833
-   [@&#8203;ntk148v](https://togithub.com/ntk148v) made their first contribution in [prometheus/client_golang#841

**Full Changelog**: prometheus/client_golang@v1.9.0...v1.10.0

### [`v1.9.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.9.0): 1.9.0 / 2020-12-17

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.8.0...v1.9.0)

-   \[FEATURE] `NewPidFileFn` helper to create process collectors for processes whose PID is read from a file. [#&#8203;804](https://togithub.com/prometheus/client_golang/issues/804)
-   \[BUGFIX] promhttp: Prevent endless loop in `InstrumentHandler...` middlewares with invalid metric or label names. [#&#8203;823](https://togithub.com/prometheus/client_golang/issues/823)

#### What's Changed

-   add the NewPidFileFn to helper by [@&#8203;sbookworm](https://togithub.com/sbookworm) in [prometheus/client_golang#804
-   Synchronize common files from prometheus/prometheus by [@&#8203;prombot](https://togithub.com/prombot) in [prometheus/client_golang#809
-   Synchronize common files from prometheus/prometheus by [@&#8203;prombot](https://togithub.com/prombot) in [prometheus/client_golang#811
-   Added example api code showing how to add auth tokens and user agents to prom client. by [@&#8203;bwplotka](https://togithub.com/bwplotka) in [prometheus/client_golang#817
-   Correct spelling: possibilites -> possibilities by [@&#8203;jubalh](https://togithub.com/jubalh) in [prometheus/client_golang#819
-   Be more explicit about the multi-line properties of MultiError by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#821
-   promhttp: Correctly detect invalid metric and label names by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#823
-    Cut release 1.9.0 by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#826

#### New Contributors

-   [@&#8203;sbookworm](https://togithub.com/sbookworm) made their first contribution in [prometheus/client_golang#804
-   [@&#8203;jubalh](https://togithub.com/jubalh) made their first contribution in [prometheus/client_golang#819

**Full Changelog**: prometheus/client_golang@v1.8.0...v1.9.0

### [`v1.8.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.8.0): 1.8.0 / 2020-10-15

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.7.1...v1.8.0)

-   \[CHANGE] API client: Use `time.Time` rather than `string` for timestamps in `RuntimeinfoResult`. [#&#8203;777](https://togithub.com/prometheus/client_golang/issues/777)
-   \[FEATURE] Export `MetricVec` to facilitate implementation of vectors of custom `Metric` types. [#&#8203;803](https://togithub.com/prometheus/client_golang/issues/803)
-   \[FEATURE API client: Support `/status/tsdb` endpoint. [#&#8203;773](https://togithub.com/prometheus/client_golang/issues/773)
-   \[ENHANCEMENT] API client: Enable GET fallback on status code 501. [#&#8203;802](https://togithub.com/prometheus/client_golang/issues/802)
-   \[ENHANCEMENT] Remove `Metric` references after reslicing to free up more memory. [#&#8203;784](https://togithub.com/prometheus/client_golang/issues/784)

#### What's Changed

-   Add support for tsdb endpoint by [@&#8203;HimaVarsha94](https://togithub.com/HimaVarsha94) in [prometheus/client_golang#773
-   Use time.Time for timestamps in Runtimeinfo by [@&#8203;mxey](https://togithub.com/mxey) in [prometheus/client_golang#777
-   fix tests warning about string(int) type conversions by [@&#8203;johejo](https://togithub.com/johejo) in [prometheus/client_golang#779
-   Update collector comment about GC stop-the-world by [@&#8203;roidelapluie](https://togithub.com/roidelapluie) in [prometheus/client_golang#783
-   Remove reference to Metric after reslicing by [@&#8203;hummerd](https://togithub.com/hummerd) in [prometheus/client_golang#784
-   Support go 1.15 by [@&#8203;roidelapluie](https://togithub.com/roidelapluie) in [prometheus/client_golang#792
-   Replace with the standard library constant. by [@&#8203;johncming](https://togithub.com/johncming) in [prometheus/client_golang#793
-   Synchronize common files from prometheus/prometheus by [@&#8203;prombot](https://togithub.com/prombot) in [prometheus/client_golang#797
-   Remove spurious commas from links to the docs site by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#800
-   API client: Enable fallback on status code 501, too by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#802
-   Export MetricVec (again) by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#803
-   Cut v1.8.0 by [@&#8203;beorn7](https://togithub.com/beorn7) in [prometheus/client_golang#806

#### New Contributors

-   [@&#8203;HimaVarsha94](https://togithub.com/HimaVarsha94) made their first contribution in [prometheus/client_golang#773
-   [@&#8203;mxey](https://togithub.com/mxey) made their first contribution in [prometheus/client_golang#777
-   [@&#8203;hummerd](https://togithub.com/hummerd) made their first contribution in [prometheus/client_golang#784
-   [@&#8203;johncming](https://togithub.com/johncming) made their first contribution in [prometheus/client_golang#793

**Full Changelog**: prometheus/client_golang@v1.7.1...v1.8.0

### [`v1.7.1`](https://togithub.com/prometheus/client_golang/releases/tag/v1.7.1): 1.7.1 / 2020-06-23

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.7.0...v1.7.1)

-   \[BUGFIX] API client: Actually propagate start/end parameters of `LabelNames` and `LabelValues`. [#&#8203;771](https://togithub.com/prometheus/client_golang/issues/771)

### [`v1.7.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.7.0): 1.7.0 / 2020-06-17

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.6.0...v1.7.0)

-   \[CHANGE] API client: Add start/end parameters to `LabelNames` and `LabelValues`. [#&#8203;767](https://togithub.com/prometheus/client_golang/issues/767)
-   \[FEATURE] testutil: Add `GatherAndCount` and enable filtering in `CollectAndCount` [#&#8203;753](https://togithub.com/prometheus/client_golang/issues/753)
-   \[FEATURE] API client: Add support for `status` and `runtimeinfo` endpoints. [#&#8203;755](https://togithub.com/prometheus/client_golang/issues/755)
-   \[ENHANCEMENT] Wrapping `nil` with a `WrapRegistererWith...` function creates a no-op `Registerer`.  [#&#8203;764](https://togithub.com/prometheus/client_golang/issues/764)
-   \[ENHANCEMENT] promlint: Allow Kelvin as a base unit for cases like color temperature. [#&#8203;761](https://togithub.com/prometheus/client_golang/issues/761)
-   \[BUGFIX] push: Properly handle empty job and label values. [#&#8203;752](https://togithub.com/prometheus/client_golang/issues/752)

### [`v1.6.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.6.0): 1.6.0 / 2020-04-28

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.5.1...v1.6.0)

-   \[FEATURE] testutil: Add lint checks for metrics, including a sub-package `promlint` to expose the linter engine for external usage. [#&#8203;739](https://togithub.com/prometheus/client_golang/issues/739) [#&#8203;743](https://togithub.com/prometheus/client_golang/issues/743)
-   \[ENHANCEMENT] API client: Improve error messages. [#&#8203;731](https://togithub.com/prometheus/client_golang/issues/731)
-   \[BUGFIX] process collector: Fix `process_resident_memory_bytes` on 32bit MS Windows. [#&#8203;734](https://togithub.com/prometheus/client_golang/issues/734)

### [`v1.5.1`](https://togithub.com/prometheus/client_golang/releases/tag/v1.5.1): 1.5.1 / 2020-03-14

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.5.0...v1.5.1)

-   \[BUGFIX] promhttp: Remove another superfluous `WriteHeader` call.

### [`v1.5.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.5.0): 1.5.0 / 2020-03-03

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.4.1...v1.5.0)

-   \[FEATURE] promauto: Add a factory to allow automatic registration with a local registry. [#&#8203;713](https://togithub.com/prometheus/client_golang/issues/713)
-   \[FEATURE] promauto: Add `NewUntypedFunc`. [#&#8203;713](https://togithub.com/prometheus/client_golang/issues/713)
-   \[FEATURE] API client: Support new metadata endpoint. [#&#8203;718](https://togithub.com/prometheus/client_golang/issues/718)

### [`v1.4.1`](https://togithub.com/prometheus/client_golang/releases/tag/v1.4.1): 1.4.1 / 2020-02-07

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.4.0...v1.4.1)

-   \[BUGFIX] Fix timestamp of exemplars in `CounterVec`. [#&#8203;710](https://togithub.com/prometheus/client_golang/issues/710)

### [`v1.4.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.4.0): 1.4.0 / 2020-01-27

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.3.0...v1.4.0)

-   \[CHANGE] Go collector: Improve doc string for `go_gc_duration_seconds`. [#&#8203;702](https://togithub.com/prometheus/client_golang/issues/702)
-   \[FEATURE] Support a subset of OpenMetrics, including exemplars. Needs opt-in via `promhttp.HandlerOpts`. **EXPERIMENTAL** [#&#8203;706](https://togithub.com/prometheus/client_golang/issues/706)
-   \[FEATURE] Add `testutil.CollectAndCount`. [#&#8203;703](https://togithub.com/prometheus/client_golang/issues/703)

### [`v1.3.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.3.0): 1.3.0 / 2019-12-21

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.2.1...v1.3.0)

-   \[FEATURE] Support tags in Graphite bridge. [#&#8203;668](https://togithub.com/prometheus/client_golang/issues/668)
-   \[BUGFIX] API client: Actually return Prometheus warnings. [#&#8203;699](https://togithub.com/prometheus/client_golang/issues/699)

### [`v1.2.1`](https://togithub.com/prometheus/client_golang/releases/tag/v1.2.1): 1.2.1 / 2019-10-17

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.2.0...v1.2.1)

#### 1.2.1 / 2019-10-17

-   \[BUGFIX] Fix regression in the implementation of `Registerer.Unregister`. [#&#8203;663](https://togithub.com/prometheus/client_golang/issues/663)

### [`v1.2.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.2.0): 1.2.0 / 2019-10-15

[Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.1.0...v1.2.0)

-   \[FEATURE] Support pushing to Pushgateway v0.10+. [#&#8203;652](https://togithub.com/prometheus/client_golang/issues/652)
-   \[ENHANCEMENT] Improve hashing to make a spurious `AlreadyRegisteredError` less likely to occur. [#&#8203;657](https://togithub.com/prometheus/client_golang/issues/657)
-   \[ENHANCEMENT] API client: Add godoc examples. [#&#8203;630](https://togithub.com/prometheus/client_golang/issues/630)
-   \[BUGFIX] promhttp: Correctly call WriteHeader in HTTP middleware. [#&#8203;634](https://togithub.com/prometheus/client_golang/issues/634)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMTAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjExMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants