[
https://issues.apache.org/jira/browse/FLINK-30833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17685012#comment-17685012
]
Mason Chen commented on FLINK-30833:
------------------------------------
For context, I was writing a connector that depends on closing some metric
groups. The closed metric group can be created independently of MetricListener
although other tests can continue to use it. [~chesnay] 's described approach
makes more sense and I will update the Jira ticket to reflect that. Thanks!
> MetricListener supports closing metric groups
> ---------------------------------------------
>
> Key: FLINK-30833
> URL: https://issues.apache.org/jira/browse/FLINK-30833
> Project: Flink
> Issue Type: Improvement
> Components: Runtime / Metrics, Tests
> Affects Versions: 1.16.1
> Reporter: Mason Chen
> Priority: Major
>
> The internal TestingMetricRegistry does not register an action when a metric
> group is closed. This would allow the use of the MetricListener to test logic
> that closes metric groups.
> [https://github.com/apache/flink/blob/44dbb8ec84792540095b826616d0f21b745aa995/flink-test-utils-parent/flink-test-utils/src/main/java/org/apache/flink/metrics/testutils/MetricListener.java#L53]
> This change doesn't require exposing any public API and is transparent.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)