Hi, I want to get metrics inside a processElement() function of a processWindowFucntion class. Below is my understanding:
*counter*: a counter variable defined inside processElement() will be reset every time when processElement() is called *meter*: a meter variable defined inside processElement() will be reset every time when processElement() is called *histogram*: a histogram variable defined inside processElement() will be reset every time when processElement() is called *gauge*: makes sense to define gauges inside processElement(). Is my understanding correct? I tried to define the metrics outside processElement() and pass these variables to processElement(). But it is a little awkward if these variables are used in classes/functions deeply nested in processElement(). Can I make these metrics variables available in Flink Runtime context so that the nested classes/functions can access these variables from the runtime context? Appreciate your guidance!