You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exposes average batch metrics at 1, 5 and 15 minutes time window. (#18460)
Updates stats API response to expose also 1m, 5m and 15m average batch metrics.
Changed the response map returned by refine_batch_metrics method as result of API query to _node/stats so tha contains the average values of last 1, 5 and 15 minutes for event_count and batch_size. These data is published once they are available from the metric collector.
Co-authored-by: Cas Donoghue <[email protected]>
# current is a tuple of [event_count, byte_size] store the reference locally to avoid repeatedly
177
177
# reading and retrieve unrelated values
178
178
current_data_point=stats[:batch][:current]
179
-
{
179
+
# FlowMetric (from stats[:batch][:event_count][:average]) returns a composite object containing lifetime/last_1_minute/etc values. In order to get the map of sub-metrics we must use `.value`.
# current_data_point is an instance of org.logstash.instrument.metrics.gauge.LazyDelegatingGauge so need to invoke getValue() to obtain the actual value
182
188
:current=>current_data_point.value[0],
183
189
:average=>{
184
-
# average return a FlowMetric which and we need to invoke getValue to obtain the map with metric details.
0 commit comments