-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Extract repositories metrics into its own class #103034
Extract repositories metrics into its own class #103034
Conversation
This PR is a follow up of elastic#102505 (comment) that move the repositories metrics management into its own class which is then passed around instead of relying on the raw meterRegistry and string metric names.
Pinging @elastic/es-distributed (Team:Distributed) |
private final LongHistogram exceptionHistogram; | ||
private final LongHistogram throttleHistogram; | ||
|
||
public RepositoriesMetrics(MeterRegistry meterRegistry) { |
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.
This is the new class. Everything else is cascading changes
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.
Considering its structure is there a value in converting this class to a record and replace constructor with a static factory?
This way we will not need to declare getters
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.
Sure I changed it to be a record.
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.
Left optional suggestion, otherwise 👍
@elasticmachine run elasticsearch-ci/part-3 |
This PR is a follow up of
#102505 (comment) that move the repositories metrics management into its own class which is then passed around instead of relying on the raw meterRegistry and string metric names.