如何在 Flink 中创建动态指标 [英] How to create dynamic metric in Flink
本文介绍了如何在 Flink 中创建动态指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个与错误数量相关的指标,但实际上我想添加一些上下文标签?最好的方法是什么?测量 ?如何在任务运行期间动态创建这种指标(因为太早,无法打开方法)?提前致谢
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.
对于错误报告,您可能会找到 side输出也很有用.
For error reporting you might find side outputs useful as well.
这篇关于如何在 Flink 中创建动态指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文