如何在Flink中创建动态指标 [英] How to create dynamic metric in Flink

查看:57
本文介绍了如何在Flink中创建动态指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个与错误数量相关的指标,但实际上我想添加一些上下文标签吗?最好的方法是什么?测量 ?如何在任务运行期间动态创建此类度量(因为过早无法使用open方法)?预先感谢

I want to create one metric related to the number of errors but in fact I would like to add some contextual labels ? What is the best way to do that ? gauge ? How to create this kind of metric dynamically during the run of the task (because open method is not possible because too early) ? Thanks in advance

大卫

推荐答案

您应该可以随时创建一个指标-在使用每个操作符实例之前,只需对其进行一次操作即可.

You should be able to create a metric whenever you want -- just do it once per operator instance, before you use it.

对于错误报告,您可能会发现侧输出也是有用的.

For error reporting you might find side outputs useful as well.

这篇关于如何在Flink中创建动态指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆