-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[MINOR] Add configuration to enable/disable common prefix for all met… #4741
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
codope
left a comment
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.
@t0il3ts0ap Thanks for the contribution. Could you please file a JIRA and add it in the PR title?
| public static final ConfigProperty<Boolean> ENABLE_COMMON_PREFIX = ConfigProperty | ||
| .key(METRIC_PREFIX + ".common_prefix.enable") | ||
| .defaultValue(true) | ||
| .sinceVersion("0.10.0") |
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.
version should be 0.11.0
|
@rmahindra123 : can you review this patch please. |
| getStringOrDefault(HoodieMetricsConfig.EXECUTOR_METRICS_ENABLE, "false")); | ||
| } | ||
|
|
||
| public boolean isMetricsCommonPrefixEnabled() { |
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.
Why do you need another config. Check this PR: https://github.com/apache/hudi/pull/4274/files. If you want remove the infer function for METRICS_REPORTER_PREFIX, so it does not use the table name as default and the user can set a prefix using METRICS_REPORTER_PREFIX. Does it make 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.
Ohh, I didnt notice while rebasing changes. I think I can use #4274. I will close this PR.
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.
No problem. Thanks @t0il3ts0ap
|
Closing this as could use #4274. |
…rics
Tips
What is the purpose of the pull request
As of now all metrics created by hudi has table name prefixed by default. This pr aims to put that behavior behind a configuration and allows the user to disable it.
For example lets say we have 2 hudi tables
customersandloan_accounts. Right now the metrics in prometheus will come like thisIts conventional in prometheus to have consistent metric name with differences in labels. After the changes in this pr, metrics will come like this which is much simpler to plot across lets say 100s of hudi tables with each having 100s of metrics.
Brief change log
Added configuration
hoodie.metrics.common_prefix.enableThis configuration is true by default and which doesnt change any behavior for existing users.
Verify this pull request
(Please pick either of the following options)
This pull request is a trivial rework / code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Committer checklist
Has a corresponding JIRA in PR title & commit
Commit message is descriptive of the change
CI is green
Necessary doc changes done or have another open PR
For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.