File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
logstash-core/src/main/java/org/logstash/execution Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,20 @@ public void updateBatchMetrics(QueueBatch batch) {
4343 return ;
4444 }
4545
46- if (batchMetricMode != QueueFactoryExt .BatchMetricMode .DISABLED ) {
47- boolean updateMetric = true ;
48- if (batchMetricMode == QueueFactoryExt .BatchMetricMode .MINIMAL ) {
49- // 1% chance to update metric
50- updateMetric = random .nextInt (100 ) < 2 ;
51- }
46+ if (batchMetricMode == QueueFactoryExt .BatchMetricMode .DISABLED ) {
47+ return ;
48+ }
5249
53- if (updateMetric ) {
54- pipelineMetricBatchCount .increment ();
55- pipelineMetricBatchTotalEvents .increment (batch .filteredSize ());
56- updateBatchSizeMetric (batch );
57- }
50+ boolean updateMetric = true ;
51+ if (batchMetricMode == QueueFactoryExt .BatchMetricMode .MINIMAL ) {
52+ // 1% chance to update metric
53+ updateMetric = random .nextInt (100 ) < 2 ;
54+ }
55+
56+ if (updateMetric ) {
57+ pipelineMetricBatchCount .increment ();
58+ pipelineMetricBatchTotalEvents .increment (batch .filteredSize ());
59+ updateBatchSizeMetric (batch );
5860 }
5961 }
6062
You can’t perform that action at this time.
0 commit comments