Sidd
07/16/2019, 6:07 PMSidd
07/16/2019, 6:09 PMSidd
07/16/2019, 6:10 PMSidd
07/16/2019, 6:13 PMNeha Pawar
Sidd
07/16/2019, 6:18 PMSidd
07/16/2019, 6:19 PMSidd
07/16/2019, 6:19 PMKishore G
Sidd
07/16/2019, 6:22 PMKishore G
Kishore G
BrokerMeter.QUERIES, 1
.
now, if we were to use a histogram, we would set something like BrokerHistogram.QUERY, MAX, 1
.but this would still end up giving us 1.
what i was thinking is we aggregate query count every 10s (or some number of seconds). and emit it to histogram. In that case, histogram would show the max value in that bucket over a minute.
but what you're suggesting is that there is a way to make the histogram emit it's size every minute. is that right?
Kishore G [10:36 AM]
what I was suggesting was to emit the in flight queries count instead of 1
that will give the max queries in flight at any time during that minute
we dont have to restrict it to 10 second aggregates
Neha Pawar [10:49 AM]
where can i get the inflight queries count?
Kishore G [11:40 AM]
I dont know if we have something for that, but just have a atomic integer
that increments when a query is scheduled
and decremented when we send the response out
with this, we wont even need historgram
Neha Pawar [12:13 PM]
sorry i still dont understand how that will help.
anything emitted as a Metric will be averaged over 1 minute. set as a Gauge will give us the sum over the last minute.
if we count requests in flight, and emit them at every increment/decrement as a metric, averaged out values wont help.
For example, over a minute if we emit 1,2,3,4,5,4,3, the metric will show as 22/60 = 3.6 (avergaed over 60 points).
if we emit it to a Gauge, metric will show 22.
Now how do we differentiate between a 22 being shown because of 1,2,3,4,5,4,3 (burst of queries) vs 1,0,1,0,1,0... (22 1's uniformly spread out queries)
Kishore G [12:15 PM]
you just emit the max right
Kishore G [12:27 PM]
is my understanding right that you really want to see number 5 in the ingraph?
Neha Pawar [12:45 PM]
yes, want to see 5
so you're suggesting using the atomic integer to incrememnt /decrement as a replacement to the 10second bucketing
i will still have to keep track of max, emit it every minute, and reset it every minute
or use histogram
Kishore G [1:11 PM]
The metrics library should keep track of max
We just update the gauge on every broker request
Kishore G [1:17 PM]
See the top answer here https://stackoverflow.com/questions/30987757/dropwizard-metrics-meters-vs-timersKishore G
Sidd
07/16/2019, 6:48 PMKishore G
Sidd
07/16/2019, 7:36 PMKishore G
Sidd
07/16/2019, 7:43 PMSidd
07/16/2019, 7:44 PMKishore G
Kishore G
Kishore G
Kishore G
Sidd
07/16/2019, 7:51 PMKishore G
Neha Pawar