[ 
https://issues.apache.org/jira/browse/FLINK-24574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17435764#comment-17435764
 ] 

Mason Chen commented on FLINK-24574:
------------------------------------

This would enable operators to properly clean up metrics. Here is an example of 
attempt that would benefit from this: 
https://github.com/apache/flink/blob/fd01adb87c54abe436ac04d4059a71784762cabd/flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/metrics/KafkaSourceReaderMetrics.java#L237

> Allow metrics to be removed in UDFs
> -----------------------------------
>
>                 Key: FLINK-24574
>                 URL: https://issues.apache.org/jira/browse/FLINK-24574
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Metrics
>    Affects Versions: 1.15.0
>            Reporter: Arvid Heise
>            Priority: Major
>
> A user asked 
> {noformat}
> Suppose I have a short lived process within a UDF that defines metrics. After 
> the process has completed, the underlying resources should be cleaned up. Is 
> there an API to remove/unregister metrics?{noformat}
> There are probably more related use cases, where a metric is only temporarily 
> meaningful.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to