-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Make MetricsRegistry as an interface #12487
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
Conversation
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.
To make sure I understand, the idea here is for Cloud to implement the MetricsRegistry interface?
Looks like there are some access modifiers errors that are breaking the build: https://github.com/airbytehq/airbyte/runs/6236766028?check_suite_focus=true#step:9:1274
* <p> | ||
* - Include the time period in the name if the metric is meant to be run at a certain interval. | ||
*/ | ||
public enum MetricsRegistries implements MetricsRegistry { |
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.
nit: Instead of MetricsRegistries
as the enum name, what about MetricsRegistryEnum
or MetricsRegistryImpl
? The plural "registries" feels slightly off to me
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.
What about PublicMetricRegistry
or OssMetricRegistry
? The practice of adding the java type to the name is a throwback to when IDEs didn't provide introspection. I generally feel its superfluous and make it more difficult to read.
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.
Sounds good - I was following MetricEmittingApp & MetricEmittingApps pattern. I think the Oss one makes sense.
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.
makes sense. i suppose that pattern is less logical here since it suggests we have multiple registries. appreciate trying to keep the consistency!
Exactly. Think some metrics such as orb are not meant to be exposed to public. Sorry about the errors, I'll address them. |
Make MetricsRegistry as an interface
What
Make MetricsRegistry as an interface so cloud server could extend from it, because cloud server has its own metrics that is not relevant to OSS
How
Make MetricsRegistry an interface so cloud server could use and implement an enum class out of it.
Recommended reading order
x.java
y.python
🚨 User Impact 🚨
Nope