-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Filter expected metrics as well in CollectAndCompare #1143
Filter expected metrics as well in CollectAndCompare #1143
Conversation
dc14293
to
2e14819
Compare
@bwplotka Please take a look at this quick fix. |
@DariaKunoichi It would be nice to have some context in the PR description. What's the expected behavior and what is not working? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for contributing! ❤️
A description of the PR would be nice, as now we have to guess what you are trying to fix here. 🙈
I guess that you would like the provided expected
slice to be affected by filtering. Thanks to that, functions like ScrapeAndCompare
could accept any bigger, arbitrary expected
stream of bytes. However, given expected stream is usually provided as a synthetic sting (typically hand-crafted), you can filter it on your own - that's why it was not filtered before.
So to push this change, ideally:
- Please tell us what use case you have, it will help motivate this change.
- Can we modify the
TestScrapeAndCompare
unit test to test this change?
Thanks for the pointers, guys. I need to remember what was the issue and I'll add the description and modify the PR if it's needed. |
2218422
to
270e7b7
Compare
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Thx and sorry for lag, will check today (: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! One important improved to test is needed if I am not wrong 🤗
expectedReader := strings.NewReader(expected) | ||
|
||
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
fmt.Fprintln(w, expected) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we expose different some_total{} so we can actually test filtering? Otherwise without your change this test would pass as well if I am understanding this correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, sure, will change.
Reply Edit
…On Tue, Mar 21, 2023, 19:20 Daria Bialobrzeska ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In prometheus/testutil/testutil_test.go
<#1143 (comment)>
:
> + const expected = `
+ # HELP some_total A value that represents a counter.
+ # TYPE some_total counter
+
+ some_total{ label1 = "value1" } 1
+
+ # HELP some_total2 A value that represents a counter.
+ # TYPE some_total2 counter
+
+ some_total2{ label1 = "value1" } 1
+ `
+
+ expectedReader := strings.NewReader(expected)
+
+ ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprintln(w, expected)
Ok, sure, will change.
—
Reply to this email directly, view it on GitHub
<#1143 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZFPUNAPBOTX72HX4X3OAY3W5GWYRANCNFSM6AAAAAAQ3UBFGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Signed-off-by: Daria Danilenko <[email protected]>
Signed-off-by: Daria Danilenko <[email protected]>
270e7b7
to
c56e566
Compare
Signed-off-by: Daria Danilenko <[email protected]>
c56e566
to
d8602eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Great job!
We have one flaky test #765, merging |
….0 (#424) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/prometheus/client_golang](https://togithub.com/prometheus/client_golang) | require | minor | `v1.14.0` -> `v1.15.0` | --- ### Release Notes <details> <summary>prometheus/client_golang</summary> ### [`v1.15.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.15.0) [Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.14.0...v1.15.0) #### Changed \[BUGFIX] Fix issue with atomic variables on ppc64le [#​1171](https://togithub.com/prometheus/client_golang/issues/1171) \[BUGFIX] Support for multiple samples within same metric [#​1181](https://togithub.com/prometheus/client_golang/issues/1181) \[BUGFIX] Bump golang.org/x/text to v0.3.8 to mitigate CVE-2022-32149 [#​1187](https://togithub.com/prometheus/client_golang/issues/1187) \[ENHANCEMENT] Add exemplars and middleware examples [#​1173](https://togithub.com/prometheus/client_golang/issues/1173) \[ENHANCEMENT] Add more context to "duplicate label names" error to enable debugging [#​1177](https://togithub.com/prometheus/client_golang/issues/1177) \[ENHANCEMENT] Add constrained labels and constrained variant for all MetricVecs [#​1151](https://togithub.com/prometheus/client_golang/issues/1151) \[ENHANCEMENT] Moved away from deprecated github.com/golang/protobuf package [#​1183](https://togithub.com/prometheus/client_golang/issues/1183) \[ENHANCEMENT] Add possibility to dynamically get label values for http instrumentation [#​1066](https://togithub.com/prometheus/client_golang/issues/1066) \[ENHANCEMENT] Add ability to Pusher to add custom headers [#​1218](https://togithub.com/prometheus/client_golang/issues/1218) \[ENHANCEMENT] api: Extend and improve efficiency of json-iterator usage [#​1225](https://togithub.com/prometheus/client_golang/issues/1225) \[ENHANCEMENT] Added (official) support for go 1.20 [#​1234](https://togithub.com/prometheus/client_golang/issues/1234) \[ENHANCEMENT] timer: Added support for exemplars [#​1233](https://togithub.com/prometheus/client_golang/issues/1233) \[ENHANCEMENT] Filter expected metrics as well in CollectAndCompare [#​1143](https://togithub.com/prometheus/client_golang/issues/1143) \[ENHANCEMENT]⚠️ Only set start/end if time is not Zero. This breaks compatibility in experimental api package. If you strictly depend on empty time.Time as actual value, the behavior is now changed [#​1238](https://togithub.com/prometheus/client_golang/issues/1238) <details> <summary>All commits</summary> - Merge release 1.14 to main by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1164](https://togithub.com/prometheus/client_golang/pull/1164) - Fix typo in doc comment by [@​beorn7](https://togithub.com/beorn7) in [https://github.com/prometheus/client_golang/pull/1166](https://togithub.com/prometheus/client_golang/pull/1166) - Fix issue with atomic variables on ppc64le by [@​beorn7](https://togithub.com/beorn7) in [https://github.com/prometheus/client_golang/pull/1171](https://togithub.com/prometheus/client_golang/pull/1171) - examples: Add exemplars and middleware examples by [@​jessicalins](https://togithub.com/jessicalins) in [https://github.com/prometheus/client_golang/pull/1173](https://togithub.com/prometheus/client_golang/pull/1173) - Add context to "duplicate label names" to enable debugging by [@​SpencerMalone](https://togithub.com/SpencerMalone) in [https://github.com/prometheus/client_golang/pull/1177](https://togithub.com/prometheus/client_golang/pull/1177) - Add constrained labels and Constrained variant for all MetricVecs by [@​Okhoshi](https://togithub.com/Okhoshi) in [https://github.com/prometheus/client_golang/pull/1151](https://togithub.com/prometheus/client_golang/pull/1151) - Support for multiple samples within same metric by [@​machadovilaca](https://togithub.com/machadovilaca) in [https://github.com/prometheus/client_golang/pull/1181](https://togithub.com/prometheus/client_golang/pull/1181) - Replace deprecated github.com/golang/protobuf package by [@​zhsj](https://togithub.com/zhsj) in [https://github.com/prometheus/client_golang/pull/1183](https://togithub.com/prometheus/client_golang/pull/1183) - Bump golang.org/x/text to v0.3.8 to mitigate CVE-2022-32149 by [@​b4bay](https://togithub.com/b4bay) in [https://github.com/prometheus/client_golang/pull/1187](https://togithub.com/prometheus/client_golang/pull/1187) - typo fix by [@​ibreakthecloud](https://togithub.com/ibreakthecloud) in [https://github.com/prometheus/client_golang/pull/1178](https://togithub.com/prometheus/client_golang/pull/1178) - Add possibility to dynamically get label values for http instrumentation by [@​Okhoshi](https://togithub.com/Okhoshi) in [https://github.com/prometheus/client_golang/pull/1066](https://togithub.com/prometheus/client_golang/pull/1066) - Bump github.com/cespare/xxhash/v2 from 2.1.2 to 2.2.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1199](https://togithub.com/prometheus/client_golang/pull/1199) - Bump github.com/prometheus/procfs from 0.8.0 to 0.9.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1198](https://togithub.com/prometheus/client_golang/pull/1198) - Bump golang.org/x/sys from 0.3.0 to 0.4.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1217](https://togithub.com/prometheus/client_golang/pull/1217) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/client_golang/pull/1213](https://togithub.com/prometheus/client_golang/pull/1213) - Bump github.com/prometheus/common from 0.37.0 to 0.39.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1197](https://togithub.com/prometheus/client_golang/pull/1197) - Add `Header` method to Pusher for custom header by [@​songjiayang](https://togithub.com/songjiayang) in [https://github.com/prometheus/client_golang/pull/1218](https://togithub.com/prometheus/client_golang/pull/1218) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/client_golang/pull/1224](https://togithub.com/prometheus/client_golang/pull/1224) - api: Extend and improve json-iterator usage by [@​beorn7](https://togithub.com/beorn7) in [https://github.com/prometheus/client_golang/pull/1225](https://togithub.com/prometheus/client_golang/pull/1225) - Indent example in godoc consistently by [@​lamida](https://togithub.com/lamida) in [https://github.com/prometheus/client_golang/pull/1226](https://togithub.com/prometheus/client_golang/pull/1226) - Remove unnecessary check if label is nil in observeWithExemplar by [@​dimonl](https://togithub.com/dimonl) in [https://github.com/prometheus/client_golang/pull/1235](https://togithub.com/prometheus/client_golang/pull/1235) - README: Remove not working gocoverage images. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1236](https://togithub.com/prometheus/client_golang/pull/1236) - Added support for go 1.20. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1234](https://togithub.com/prometheus/client_golang/pull/1234) - timer: Added support for exemplars. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1233](https://togithub.com/prometheus/client_golang/pull/1233) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/client_golang/pull/1237](https://togithub.com/prometheus/client_golang/pull/1237) - Filter expected metrics as well in CollectAndCompare by [@​DariaKunoichi](https://togithub.com/DariaKunoichi) in [https://github.com/prometheus/client_golang/pull/1143](https://togithub.com/prometheus/client_golang/pull/1143) - Only set start/end if time is not Zero by [@​jacksontj](https://togithub.com/jacksontj) in [https://github.com/prometheus/client_golang/pull/1238](https://togithub.com/prometheus/client_golang/pull/1238) - Bump google.golang.org/protobuf from 1.28.1 to 1.30.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1243](https://togithub.com/prometheus/client_golang/pull/1243) - Bump golang.org/x/sys from 0.5.0 to 0.6.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1246](https://togithub.com/prometheus/client_golang/pull/1246) - Bump github.com/golang/protobuf from 1.5.2 to 1.5.3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1245](https://togithub.com/prometheus/client_golang/pull/1245) - Bump github.com/prometheus/common from 0.41.0 to 0.42.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1244](https://togithub.com/prometheus/client_golang/pull/1244) - Cut v1.15.0 by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1249](https://togithub.com/prometheus/client_golang/pull/1249) </details> #### New Contributors * @​SpencerMalone made their first contributi[https://github.com/prometheus/client_golang/pull/1177](https://togithub.com/prometheus/client_golang/pull/1177)l/1177 * @​Okhoshi made their first contributi[https://github.com/prometheus/client_golang/pull/1151](https://togithub.com/prometheus/client_golang/pull/1151)l/1151 * @​machadovilaca made their first contributi[https://github.com/prometheus/client_golang/pull/1181](https://togithub.com/prometheus/client_golang/pull/1181)l/1181 * @​b4bay made their first contributi[https://github.com/prometheus/client_golang/pull/1187](https://togithub.com/prometheus/client_golang/pull/1187)l/1187 * @​ibreakthecloud made their first contributi[https://github.com/prometheus/client_golang/pull/1178](https://togithub.com/prometheus/client_golang/pull/1178)l/1178 * @​songjiayang made their first contributi[https://github.com/prometheus/client_golang/pull/1218](https://togithub.com/prometheus/client_golang/pull/1218)l/1218 * @​lamida made their first contributi[https://github.com/prometheus/client_golang/pull/1226](https://togithub.com/prometheus/client_golang/pull/1226)l/1226 * @​dimonl made their first contributi[https://github.com/prometheus/client_golang/pull/1235](https://togithub.com/prometheus/client_golang/pull/1235)l/1235 * @​DariaKunoichi made their first contributi[https://github.com/prometheus/client_golang/pull/1143](https://togithub.com/prometheus/client_golang/pull/1143)l/1143 **Full Changelog**: prometheus/client_golang@v1.14.0...v1.15.0 </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 [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/hetznercloud/hcloud-cloud-controller-manager). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS40MC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNDAuMCJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
….0 (#608) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/prometheus/client_golang](https://togithub.com/prometheus/client_golang) | require | minor | `v1.14.0` -> `v1.15.0` | --- ### Release Notes <details> <summary>prometheus/client_golang</summary> ### [`v1.15.0`](https://togithub.com/prometheus/client_golang/releases/tag/v1.15.0) [Compare Source](https://togithub.com/prometheus/client_golang/compare/v1.14.0...v1.15.0) #### Changed \[BUGFIX] Fix issue with atomic variables on ppc64le [#​1171](https://togithub.com/prometheus/client_golang/issues/1171) \[BUGFIX] Support for multiple samples within same metric [#​1181](https://togithub.com/prometheus/client_golang/issues/1181) \[BUGFIX] Bump golang.org/x/text to v0.3.8 to mitigate CVE-2022-32149 [#​1187](https://togithub.com/prometheus/client_golang/issues/1187) \[ENHANCEMENT] Add exemplars and middleware examples [#​1173](https://togithub.com/prometheus/client_golang/issues/1173) \[ENHANCEMENT] Add more context to "duplicate label names" error to enable debugging [#​1177](https://togithub.com/prometheus/client_golang/issues/1177) \[ENHANCEMENT] Add constrained labels and constrained variant for all MetricVecs [#​1151](https://togithub.com/prometheus/client_golang/issues/1151) \[ENHANCEMENT] Moved away from deprecated github.com/golang/protobuf package [#​1183](https://togithub.com/prometheus/client_golang/issues/1183) \[ENHANCEMENT] Add possibility to dynamically get label values for http instrumentation [#​1066](https://togithub.com/prometheus/client_golang/issues/1066) \[ENHANCEMENT] Add ability to Pusher to add custom headers [#​1218](https://togithub.com/prometheus/client_golang/issues/1218) \[ENHANCEMENT] api: Extend and improve efficiency of json-iterator usage [#​1225](https://togithub.com/prometheus/client_golang/issues/1225) \[ENHANCEMENT] Added (official) support for go 1.20 [#​1234](https://togithub.com/prometheus/client_golang/issues/1234) \[ENHANCEMENT] timer: Added support for exemplars [#​1233](https://togithub.com/prometheus/client_golang/issues/1233) \[ENHANCEMENT] Filter expected metrics as well in CollectAndCompare [#​1143](https://togithub.com/prometheus/client_golang/issues/1143) \[ENHANCEMENT]⚠️ Only set start/end if time is not Zero. This breaks compatibility in experimental api package. If you strictly depend on empty time.Time as actual value, the behavior is now changed [#​1238](https://togithub.com/prometheus/client_golang/issues/1238) <details> <summary>All commits</summary> - Merge release 1.14 to main by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1164](https://togithub.com/prometheus/client_golang/pull/1164) - Fix typo in doc comment by [@​beorn7](https://togithub.com/beorn7) in [https://github.com/prometheus/client_golang/pull/1166](https://togithub.com/prometheus/client_golang/pull/1166) - Fix issue with atomic variables on ppc64le by [@​beorn7](https://togithub.com/beorn7) in [https://github.com/prometheus/client_golang/pull/1171](https://togithub.com/prometheus/client_golang/pull/1171) - examples: Add exemplars and middleware examples by [@​jessicalins](https://togithub.com/jessicalins) in [https://github.com/prometheus/client_golang/pull/1173](https://togithub.com/prometheus/client_golang/pull/1173) - Add context to "duplicate label names" to enable debugging by [@​SpencerMalone](https://togithub.com/SpencerMalone) in [https://github.com/prometheus/client_golang/pull/1177](https://togithub.com/prometheus/client_golang/pull/1177) - Add constrained labels and Constrained variant for all MetricVecs by [@​Okhoshi](https://togithub.com/Okhoshi) in [https://github.com/prometheus/client_golang/pull/1151](https://togithub.com/prometheus/client_golang/pull/1151) - Support for multiple samples within same metric by [@​machadovilaca](https://togithub.com/machadovilaca) in [https://github.com/prometheus/client_golang/pull/1181](https://togithub.com/prometheus/client_golang/pull/1181) - Replace deprecated github.com/golang/protobuf package by [@​zhsj](https://togithub.com/zhsj) in [https://github.com/prometheus/client_golang/pull/1183](https://togithub.com/prometheus/client_golang/pull/1183) - Bump golang.org/x/text to v0.3.8 to mitigate CVE-2022-32149 by [@​b4bay](https://togithub.com/b4bay) in [https://github.com/prometheus/client_golang/pull/1187](https://togithub.com/prometheus/client_golang/pull/1187) - typo fix by [@​ibreakthecloud](https://togithub.com/ibreakthecloud) in [https://github.com/prometheus/client_golang/pull/1178](https://togithub.com/prometheus/client_golang/pull/1178) - Add possibility to dynamically get label values for http instrumentation by [@​Okhoshi](https://togithub.com/Okhoshi) in [https://github.com/prometheus/client_golang/pull/1066](https://togithub.com/prometheus/client_golang/pull/1066) - Bump github.com/cespare/xxhash/v2 from 2.1.2 to 2.2.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1199](https://togithub.com/prometheus/client_golang/pull/1199) - Bump github.com/prometheus/procfs from 0.8.0 to 0.9.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1198](https://togithub.com/prometheus/client_golang/pull/1198) - Bump golang.org/x/sys from 0.3.0 to 0.4.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1217](https://togithub.com/prometheus/client_golang/pull/1217) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/client_golang/pull/1213](https://togithub.com/prometheus/client_golang/pull/1213) - Bump github.com/prometheus/common from 0.37.0 to 0.39.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1197](https://togithub.com/prometheus/client_golang/pull/1197) - Add `Header` method to Pusher for custom header by [@​songjiayang](https://togithub.com/songjiayang) in [https://github.com/prometheus/client_golang/pull/1218](https://togithub.com/prometheus/client_golang/pull/1218) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/client_golang/pull/1224](https://togithub.com/prometheus/client_golang/pull/1224) - api: Extend and improve json-iterator usage by [@​beorn7](https://togithub.com/beorn7) in [https://github.com/prometheus/client_golang/pull/1225](https://togithub.com/prometheus/client_golang/pull/1225) - Indent example in godoc consistently by [@​lamida](https://togithub.com/lamida) in [https://github.com/prometheus/client_golang/pull/1226](https://togithub.com/prometheus/client_golang/pull/1226) - Remove unnecessary check if label is nil in observeWithExemplar by [@​dimonl](https://togithub.com/dimonl) in [https://github.com/prometheus/client_golang/pull/1235](https://togithub.com/prometheus/client_golang/pull/1235) - README: Remove not working gocoverage images. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1236](https://togithub.com/prometheus/client_golang/pull/1236) - Added support for go 1.20. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1234](https://togithub.com/prometheus/client_golang/pull/1234) - timer: Added support for exemplars. by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1233](https://togithub.com/prometheus/client_golang/pull/1233) - Synchronize common files from prometheus/prometheus by [@​prombot](https://togithub.com/prombot) in [https://github.com/prometheus/client_golang/pull/1237](https://togithub.com/prometheus/client_golang/pull/1237) - Filter expected metrics as well in CollectAndCompare by [@​DariaKunoichi](https://togithub.com/DariaKunoichi) in [https://github.com/prometheus/client_golang/pull/1143](https://togithub.com/prometheus/client_golang/pull/1143) - Only set start/end if time is not Zero by [@​jacksontj](https://togithub.com/jacksontj) in [https://github.com/prometheus/client_golang/pull/1238](https://togithub.com/prometheus/client_golang/pull/1238) - Bump google.golang.org/protobuf from 1.28.1 to 1.30.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1243](https://togithub.com/prometheus/client_golang/pull/1243) - Bump golang.org/x/sys from 0.5.0 to 0.6.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1246](https://togithub.com/prometheus/client_golang/pull/1246) - Bump github.com/golang/protobuf from 1.5.2 to 1.5.3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1245](https://togithub.com/prometheus/client_golang/pull/1245) - Bump github.com/prometheus/common from 0.41.0 to 0.42.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/prometheus/client_golang/pull/1244](https://togithub.com/prometheus/client_golang/pull/1244) - Cut v1.15.0 by [@​bwplotka](https://togithub.com/bwplotka) in [https://github.com/prometheus/client_golang/pull/1249](https://togithub.com/prometheus/client_golang/pull/1249) </details> #### New Contributors * @​SpencerMalone made their first contributi[https://github.com/prometheus/client_golang/pull/1177](https://togithub.com/prometheus/client_golang/pull/1177)l/1177 * @​Okhoshi made their first contributi[https://github.com/prometheus/client_golang/pull/1151](https://togithub.com/prometheus/client_golang/pull/1151)l/1151 * @​machadovilaca made their first contributi[https://github.com/prometheus/client_golang/pull/1181](https://togithub.com/prometheus/client_golang/pull/1181)l/1181 * @​b4bay made their first contributi[https://github.com/prometheus/client_golang/pull/1187](https://togithub.com/prometheus/client_golang/pull/1187)l/1187 * @​ibreakthecloud made their first contributi[https://github.com/prometheus/client_golang/pull/1178](https://togithub.com/prometheus/client_golang/pull/1178)l/1178 * @​songjiayang made their first contributi[https://github.com/prometheus/client_golang/pull/1218](https://togithub.com/prometheus/client_golang/pull/1218)l/1218 * @​lamida made their first contributi[https://github.com/prometheus/client_golang/pull/1226](https://togithub.com/prometheus/client_golang/pull/1226)l/1226 * @​dimonl made their first contributi[https://github.com/prometheus/client_golang/pull/1235](https://togithub.com/prometheus/client_golang/pull/1235)l/1235 * @​DariaKunoichi made their first contributi[https://github.com/prometheus/client_golang/pull/1143](https://togithub.com/prometheus/client_golang/pull/1143)l/1143 **Full Changelog**: prometheus/client_golang@v1.14.0...v1.15.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **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 [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/open-feature/flagd). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS40MC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNDAuMCJ9--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Problem:
Implementation for GatherAndCompare does not match documentation. Documentation says that if you provide any metricNames it filters both provided and expected metrics. But only provided metrics are filtered in
compareMetricFamilies
function.Here is my usecase: https://github.com/fluxninja/aperture/blob/main/pkg/otelcollector/metricsprocessor/processor_test.go#L154
I manually add
<split>
in the expectedMetrics string so I don't have to provide multiple expectedMetrics variables.