[jira] [Commented] (FLINK-14065) Log metric name when the metric fails on registration/unregistration
[ https://issues.apache.org/jira/browse/FLINK-14065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16929784#comment-16929784 ] Zhilong Hong commented on FLINK-14065: -- Thanks, Till. I've already came up with a pull request. > Log metric name when the metric fails on registration/unregistration > > > Key: FLINK-14065 > URL: https://issues.apache.org/jira/browse/FLINK-14065 > Project: Flink > Issue Type: Improvement > Components: Runtime / Metrics >Affects Versions: 1.9.0 >Reporter: Zhilong Hong >Assignee: Zhilong Hong >Priority: Trivial > Labels: easyfix, pull-request-available > Fix For: 1.10.0 > > Time Spent: 10m > Remaining Estimate: 0h > > When MetricGroup registers Metrics in MetricRegistryImpl, sometimes the > registration fails due to exceptions. However, currently it only logs > "{{Error while registering metric}}" with no more information, which is > inconvenient for users to troubleshoot which metric fails and why it fails. > Also, the warning log in registration and unregistration are both "{{Error > while registering metric}}". This will lead users to confusion (although > users can locate the correct place according to the call stack). > So I propose to log metric name when the metrics fails on > registration/unregistration. -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Commented] (FLINK-14065) Log metric name when the metric fails on registration/unregistration
[ https://issues.apache.org/jira/browse/FLINK-14065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16929049#comment-16929049 ] Till Rohrmann commented on FLINK-14065: --- Sounds good to me. I've assigned you to the issue [~Thesharing]. > Log metric name when the metric fails on registration/unregistration > > > Key: FLINK-14065 > URL: https://issues.apache.org/jira/browse/FLINK-14065 > Project: Flink > Issue Type: Improvement > Components: Runtime / Metrics >Affects Versions: 1.9.0 >Reporter: Zhilong Hong >Priority: Trivial > Labels: easyfix > Fix For: 1.10.0 > > > When MetricGroup registers Metrics in MetricRegistryImpl, sometimes the > registration fails due to exceptions. However, currently it only logs > "{{Error while registering metric}}" with no more information, which is > inconvenient for users to troubleshoot which metric fails and why it fails. > Also, the warning log in registration and unregistration are both "{{Error > while registering metric}}". This will lead users to confusion (although > users can locate the correct place according to the call stack). > So I propose to log metric name when the metrics fails on > registration/unregistration. -- This message was sent by Atlassian Jira (v8.3.2#803003)
[jira] [Commented] (FLINK-14065) Log metric name when the metric fails on registration/unregistration
[ https://issues.apache.org/jira/browse/FLINK-14065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16928279#comment-16928279 ] Zhilong Hong commented on FLINK-14065: -- It would be my pleasure if I can help to fix this issue. I'm planning to add metric name in log string in MetricRegistryImpl#register like this: {{LOG.warn("Error while registering metric: {}.", metricName, e);}} and change the log string in MetricRegistryImpl#unregister like this: {{LOG.warn("Error while unregistering metric: {}.", metricName, e);}} > Log metric name when the metric fails on registration/unregistration > > > Key: FLINK-14065 > URL: https://issues.apache.org/jira/browse/FLINK-14065 > Project: Flink > Issue Type: Improvement > Components: Runtime / Metrics >Affects Versions: 1.9.0 >Reporter: Zhilong Hong >Priority: Trivial > Labels: easyfix > Fix For: 1.10.0 > > > When MetricGroup registers Metrics in MetricRegistryImpl, sometimes the > registration fails due to exceptions. However, currently it only logs > {{"Error while registering metric" }}with no more information, which is > inconvenient for users to troubleshoot which metric fails and why it fails. > Also, the warning log in registration and unregistration are both "{{Error > while registering metric}}". This will lead users to confusion (although > users can locate the correct place according to the call stack). > So I propose to log metric name when the metrics fails on > registration/unregistration. -- This message was sent by Atlassian Jira (v8.3.2#803003)