Skip to content

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

Merged
merged 6 commits into from
May 4, 2022
Merged

Make MetricsRegistry as an interface #12487

merged 6 commits into from
May 4, 2022

Conversation

xiaohansong
Copy link
Contributor

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

  1. x.java
  2. y.python

🚨 User Impact 🚨

Nope

@xiaohansong xiaohansong marked this pull request as ready for review April 30, 2022 00:32
@CLAassistant
Copy link

CLAassistant commented Apr 30, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@davinchia davinchia left a 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 {
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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!

@xiaohansong
Copy link
Contributor Author

xiaohansong commented May 3, 2022

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

Exactly. Think some metrics such as orb are not meant to be exposed to public.

Sorry about the errors, I'll address them.

@xiaohansong xiaohansong temporarily deployed to more-secrets May 3, 2022 23:01 Inactive
@xiaohansong xiaohansong temporarily deployed to more-secrets May 3, 2022 23:01 Inactive
@github-actions github-actions bot added area/platform issues related to the platform area/worker Related to worker labels May 3, 2022
@xiaohansong xiaohansong temporarily deployed to more-secrets May 3, 2022 23:10 Inactive
@xiaohansong xiaohansong temporarily deployed to more-secrets May 3, 2022 23:10 Inactive
@xiaohansong xiaohansong temporarily deployed to more-secrets May 3, 2022 23:35 Inactive
@xiaohansong xiaohansong temporarily deployed to more-secrets May 3, 2022 23:35 Inactive
@xiaohansong xiaohansong merged commit 341ef12 into master May 4, 2022
@xiaohansong xiaohansong deleted the xiaohan/dog2 branch May 4, 2022 16:31
suhomud pushed a commit that referenced this pull request May 23, 2022
Make MetricsRegistry as an interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform issues related to the platform area/worker Related to worker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants