Re: User metrics outside tasks

Posted by Alexey Trenikhun on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/User-metrics-outside-tasks-tp42107p42157.html

Couple of use cases, I have metric representing job version, currently it bound for a task, but I want bound it to job manager, another example I have dump to on OOM exception configured, and on start, I want to check content of directory with dumps and if not empty increase restarted-due-to-OOM counter 


From: Arvid Heise <[hidden email]>
Sent: Thursday, March 11, 2021 5:22:30 AM
To: Alexey Trenikhun <[hidden email]>
Cc: Flink User Mail List <[hidden email]>; Chesnay Schepler <[hidden email]>
Subject: Re: User metrics outside tasks
 
Hi Alexey,

could you describe what you want to achieve? Most metrics are bound to a specific task (available in RuntimeContext). You can also access them in custom operators and state backends.

Then you have some metrics bound to taskmanager and even java processes, but I don't see an easy way to access them.

I'm also pulling in Chesnay; he can probably help you more (but I guess we really need to understand your need).



On Wed, Mar 10, 2021 at 5:44 PM Alexey Trenikhun <[hidden email]> wrote:
Hello,
Is it possible to register user metric outside task/operator (not in RichMapFunction#open)

Thanks,
Alexey