文章目录
前言
Flink exposes a metric system that allows gathering and exposing metrics to external systems
1. Registering metrics
继承RichFunction,调用getRuntimeContext().getMetricGroup()
2. Metrics 的类型
2.1 counter
计数器,累加或者累减
2.2 Gauge
提供各种类型的值
2.3 Histogram
表示度量值的统计结果,如平均值、最大值
2.4 meter
表示平均吞吐量,单位时间内事件次数