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 a more type safe way of registering gauges #2642

Merged
merged 5 commits into from Jun 18, 2022
Merged

Conversation

arteam
Copy link
Member

@arteam arteam commented Jun 2, 2022

Add the registerGauge method to MetricRegistry that accepts Gauge<T> instead of Metric which makes it possible to register a gauge as a lambda expression without declaring its type explicetly.

@gitpod-io
Copy link

gitpod-io bot commented Jun 2, 2022

@arteam arteam force-pushed the safe-gauges branch 2 times, most recently from be7c548 to 42326a9 Compare June 2, 2022 17:13
@jplock jplock added this to the 4.2.10 milestone Jun 5, 2022
@joschi
Copy link
Member

joschi commented Jun 7, 2022

@arteam Anything you want to polish/improve in this pull request?

Happy to merge it otherwise. 😃

@arteam arteam marked this pull request as ready for review June 16, 2022 15:25
@arteam arteam requested review from a team as code owners June 16, 2022 15:25
@arteam
Copy link
Member Author

arteam commented Jun 17, 2022

@joschi I think it should be good to go 👍

Copy link
Member

@joschi joschi left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks! 👍

@joschi joschi enabled auto-merge (squash) June 18, 2022 17:41
@sonarcloud
Copy link

sonarcloud bot commented Jun 18, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

91.5% 91.5% Coverage
11.1% 11.1% Duplication

@joschi joschi disabled auto-merge June 18, 2022 17:45
@joschi joschi merged commit c1d0fb9 into release/4.2.x Jun 18, 2022
@joschi joschi deleted the safe-gauges branch June 18, 2022 17:46
dongjoon-hyun pushed a commit to apache/spark that referenced this pull request Aug 3, 2022
### What changes were proposed in this pull request?
This pr upgrade dropwizard metrics from 4.2.7 to 4.2.10 and changes the links [http://metrics.dropwizard.io/4.2.0](http://metrics.dropwizard.io/4.2.0) in `docs/monitoring.md` to [https://metrics.dropwizard.io/4.2.0](https://metrics.dropwizard.io/4.2.0)

### Why are the changes needed?
There are 3 versions after 4.2.7, the release notes as follows:

- https://github.com/dropwizard/metrics/releases/tag/v4.2.8
- https://github.com/dropwizard/metrics/releases/tag/v4.2.9
- https://github.com/dropwizard/metrics/releases/tag/v4.2.10

The new version brings a new API for more type safe of registering gauges(dropwizard/metrics#2642)

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

Closes #37372 from LuciferYang/dropwizard-4210.

Authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
joschi pushed a commit that referenced this pull request Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants