-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[exporter/clickhouse]: Add the ability to override default table names for all metric types #34251
[exporter/clickhouse]: Add the ability to override default table names for all metric types #34251
Conversation
Hi @odubajDT, thanks for quick PR regarding my issue.
|
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.
Thanks for submitting this PR!
I agree with what @Fiery-Fenix suggested. We should have it change the full table name, not just the suffix. It's better to have %s
correlate with a single symbol in the SQL instead of doing %s%s
. In this case the symbol we want to replace is the full table name.
The config + metrics functions will need to be updated to select the proper table name depending on the metric type. We should also consider which default values to provide, as well as how to handle the existing metrics table config field.
I would say the existing metrics table config field takes precedence, and we should only use the new values if that value is unset (empty string).
Let me know what you think
Thanks for the response! To wrap it up that I understand it correctly -> the require change would be to keep the original
Totally agree with this ^^ approach. What about a scenario where only some of the
Would this be a valid input? If yes, what would be the expected behavior? In my opinion I would rather restrict using And additional question at the end, the default values (when none of the parameters are set) will stay the same as they are now? Thanks for the responses! :) |
From my perspective - I would say that we should use this logic:
Examples: Case 1
Logic is the same as now Case 2
Log a warning, ignore
Case 3
The same as in Case 2, but without warnings and ignoring old parameter Using this approach we will avoid breaking changed (except for deprecation of old parameter), existing users will receive totally the same behavior, new functionality will work correctly even if user will mix deprecated and new approach |
Agree, thanks for clarification! One more suggestion, if we want to deprecate |
8bad25c
to
a655c0f
Compare
ddf0ebb
to
4ac7177
Compare
Hi @Fiery-Fenix @SpencerTorres can you take a look please? Thanks! |
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.
Overall a great feature for the exporter. I appreciate the changes you made to the DDL where we have full control of the table name from the code. I have several other notes on how we might simplify the overall code flow in the configuration stage.
Thank you for your time and contribution, let me know if you have any other questions!
df1aeb0
to
f340c85
Compare
Hey @SpencerTorres thanks for the review! Please have another look after the adaptations |
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.
The internal API for the metrics tables using a configurable struct is a great improvement. Just a few nits on the README to make sure users have a good sample config.
I appreciate your patience and time in updating this PR
8a414d9
to
98126a7
Compare
Hey @SpencerTorres can you please check again? Thank you! |
Hi @SpencerTorres any updates on this? Thanks! |
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.
Thanks for the updates!
This should be ready to merge, just need to verify from the other code owners |
…s for all metric types Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
9072fef
to
d47be57
Compare
The current test failures are not related to the changes in this PR |
@mx-psi can you have another look please ? |
cc @mx-psi |
…s for all metric types (open-telemetry#34251) **Description:** <Describe what has changed.> - add the ability to override default table names for all metric types **Link to tracking Issue:** open-telemetry#34225 **Testing:** - unit tests **Documentation:** <Describe the documentation added.> --------- Signed-off-by: odubajDT <[email protected]>
…s for all metric types (open-telemetry#34251) **Description:** <Describe what has changed.> - add the ability to override default table names for all metric types **Link to tracking Issue:** open-telemetry#34225 **Testing:** - unit tests **Documentation:** <Describe the documentation added.> --------- Signed-off-by: odubajDT <[email protected]>
Description:
Link to tracking Issue: #34225
Testing:
Documentation: