Skip to content

Conversation

@nastra
Copy link
Contributor

@nastra nastra commented Dec 11, 2022

In certain cases it makes sense to make the used metrics reporter customizable, so that users have more control over it and how it's reporting

new BaseTable(
ops,
fullTableName(loadedIdent),
report -> reportMetrics(tableIdentifier, report, session::headers));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just distantly related and only for my own information: With the current implementation MetricsReporter could be configured when we start the Catalog and then all the tables within this catalog would use the same MetricsReporter. I'm wondering if it would make sense to make this setting more flexible, like being able to set this even after the Catalog is up and running, and additionally have the ability to use different MetricsReporter implementation for different tables.
I don't have any specific use-cases in mind, one could be when let's say querying a table becomes pretty slow at some point and we want to switch to another MetricsReporter that could help us analysing the scan metrics to spot the issue, and then switch back to LoggingMetricsReporter once the issue is solved. (Assuming that in the future we gonna have way more scan metrics that could be used for debugging such issues)

This is not meant to be covered in this PR just thinking out loud if it makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like being able to set this even after the Catalog is up and running

I'm not sure this is want we want. I would probably say it's better/easier to just re-configure/re-build the catalog with a different metrics reporter. This is what we do across other catalog properties as well.

have the ability to use different MetricsReporter implementation for different tables.

I don't think the UX will be great in such a case where a user would have to re-configure the metrics reporter per table. I think if we'd want to support something like that, then we'd need a strong use case that justifies this.

This is just my personal opinion, but I'm happy to hear what others think on that topic. If there's enough interest/a strong use case then we can re-evaluate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @nastra on these.

I don't think that the metrics reporter needs to be very flexible because it isn't a user setting or a table setting. It is almost certainly something that will be handled by platform administrators. That means injecting it per catalog is the right thing to do.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing your thoughts, @nastra, @rdblue!

@nastra nastra force-pushed the configurable-metrics-reporter branch from f914a04 to 475d946 Compare December 12, 2022 14:59
@nastra nastra closed this Dec 12, 2022
@nastra nastra reopened this Dec 12, 2022
@nastra nastra force-pushed the configurable-metrics-reporter branch from 475d946 to 5814c52 Compare December 13, 2022 18:54
@nastra nastra requested a review from rdblue December 14, 2022 07:36
@rdblue rdblue merged commit 59d0dee into apache:master Dec 18, 2022
@rdblue
Copy link
Contributor

rdblue commented Dec 18, 2022

Thanks, @nastra!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants