Gauges generating same graph

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Gauges generating same graph

Manish G
Hi All,

I have few RichFlatMapFunction classes, and I have gauge added to each one of  them. For a particular usecase I am updating these gauges incrementally. I have a class member variable in each of these classes which keeps increasing as flapMap function in these classes is called, and then I update corresponding gauge with this updated value.

I observe that some of these gauges show almost exactly same graph in grafana. Can it be due to this approach?
Reply | Threaded
Open this post in threaded view
|

Re: Gauges generating same graph

Arvid Heise-3
Hi Manish,

This approach sounds fishy. Shouldn't all instances of the function on the same task manager then have the same value?

Why do you need the variable? What's not working when updating the gauge directly?

On Fri, Jan 15, 2021 at 4:46 AM Manish G <[hidden email]> wrote:
Hi All,

I have few RichFlatMapFunction classes, and I have gauge added to each one of  them. For a particular usecase I am updating these gauges incrementally. I have a class member variable in each of these classes which keeps increasing as flapMap function in these classes is called, and then I update corresponding gauge with this updated value.

I observe that some of these gauges show almost exactly same graph in grafana. Can it be due to this approach?


--

Arvid Heise | Senior Java Developer


Follow us @VervericaData

--

Join Flink Forward - The Apache Flink Conference

Stream Processing | Event Driven | Real Time

--

Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany

--

Ververica GmbH
Registered at Amtsgericht Charlottenburg: HRB 158244 B
Managing Directors: Timothy Alexander Steinert, Yip Park Tung Jason, Ji (Toni) Cheng   
Reply | Threaded
Open this post in threaded view
|

Re: Gauges generating same graph

Manish G
So my flatmap function processes input event which contain some domain specific value, and I need to keep track how much of this value has been processed with the invocations of the flatmap. Hence I am having a class variable which I then update whenever function is invoked, and set it to gauge.
Each of my flatmap class has to achieve this, so I have maintained such a variable in each one of them and keep updating them.

On Fri, Jan 15, 2021 at 6:55 PM Arvid Heise <[hidden email]> wrote:
Hi Manish,

This approach sounds fishy. Shouldn't all instances of the function on the same task manager then have the same value?

Why do you need the variable? What's not working when updating the gauge directly?

On Fri, Jan 15, 2021 at 4:46 AM Manish G <[hidden email]> wrote:
Hi All,

I have few RichFlatMapFunction classes, and I have gauge added to each one of  them. For a particular usecase I am updating these gauges incrementally. I have a class member variable in each of these classes which keeps increasing as flapMap function in these classes is called, and then I update corresponding gauge with this updated value.

I observe that some of these gauges show almost exactly same graph in grafana. Can it be due to this approach?


--

Arvid Heise | Senior Java Developer


Follow us @VervericaData

--

Join Flink Forward - The Apache Flink Conference

Stream Processing | Event Driven | Real Time

--

Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany

--

Ververica GmbH
Registered at Amtsgericht Charlottenburg: HRB 158244 B
Managing Directors: Timothy Alexander Steinert, Yip Park Tung Jason, Ji (Toni) Cheng