File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
logstash-core/src/main/java/org/logstash Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -67,14 +67,14 @@ public void updateBatchMetrics(QueueBatch batch) {
6767 private void updateBatchSizeMetric (QueueBatch batch ) {
6868 try {
6969 // if an error occurs in estimating the size of the batch, no counter has to be updated
70- long totalSize = 0L ;
70+ long totalByteSize = 0L ;
7171 for (JrubyEventExtLibrary .RubyEvent rubyEvent : batch .events ()) {
72- totalSize += rubyEvent .getEvent ().estimateMemory ();
72+ totalByteSize += rubyEvent .getEvent ().estimateMemory ();
7373 }
7474 pipelineMetricBatchCount .increment ();
7575 pipelineMetricBatchTotalEvents .increment (batch .filteredSize ());
76- pipelineMetricBatchByteSize .increment (totalSize );
77- currentBatchDimensions .set (Arrays .asList (batch .filteredSize (), totalSize ));
76+ pipelineMetricBatchByteSize .increment (totalByteSize );
77+ currentBatchDimensions .set (Arrays .asList (batch .filteredSize (), totalByteSize ));
7878 } catch (IllegalArgumentException e ) {
7979 LOG .error ("Failed to calculate batch byte size for metrics" , e );
8080 }
Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ public final class MetricExt extends AbstractSimpleMetricExt {
4444
4545 private static final long serialVersionUID = 1L ;
4646
47- public static final RubySymbol COUNTER = RubyUtil .RUBY .newSymbol ("counter" );
47+ // These two metric type symbols need to be package-private because used in NamespacedMetricExt
48+ static final RubySymbol COUNTER = RubyUtil .RUBY .newSymbol ("counter" );
49+ static final RubySymbol GAUGE = RubyUtil .RUBY .newSymbol ("gauge" );
4850
4951 private static final RubyFixnum ONE = RubyUtil .RUBY .newFixnum (1 );
5052
5153 private static final RubySymbol INCREMENT = RubyUtil .RUBY .newSymbol ("increment" );
5254
5355 private static final RubySymbol DECREMENT = RubyUtil .RUBY .newSymbol ("decrement" );
54-
55- public static final RubySymbol GAUGE = RubyUtil .RUBY .newSymbol ("gauge" );
5656 private static final RubySymbol TIMER = RubyUtil .RUBY .newSymbol ("timer" );
5757 private static final RubySymbol SET = RubyUtil .RUBY .newSymbol ("set" );
5858 private static final RubySymbol GET = RubyUtil .RUBY .newSymbol ("get" );
You can’t perform that action at this time.
0 commit comments