Skip to content

Commit cc22aa2

Browse files
committed
Minor, removed commented code
1 parent 8ab663b commit cc22aa2

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

logstash-core/src/main/java/org/logstash/execution/AbstractPipelineExt.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -608,14 +608,6 @@ private void initializeBatchMetrics(ThreadContext context) {
608608
final FlowMetric byteSizePerBatch = createFlowMetric(BATCH_AVERAGE_KEY, totalBytes, batchCounter);
609609
this.scopedFlowMetrics.register(ScopedFlowMetrics.Scope.WORKER, byteSizePerBatch);
610610
storeMetric(context, batchSizeNamespace, byteSizePerBatch);
611-
612-
// initOrGetTextGaugeMetric(context, buildNamespace(BATCH_KEY), BATCH_CURRENT_KEY);
613-
// Optional<TextGauge> textGauge = initOrGetTextGaugeMetric(context, buildNamespace(BATCH_KEY), BATCH_CURRENT_KEY);
614-
// if (textGauge.isPresent()) {
615-
// storeMetric(context, batchSizeNamespace, textGauge.get());
616-
// } else {
617-
// LOGGER.warn("Unable to initialize batch.current gauge, it will not be available");
618-
// }
619611
}
620612

621613
private boolean isBatchMetricsEnabled(ThreadContext context) {
@@ -691,21 +683,6 @@ private Optional<NumberGauge> initOrGetNumberGaugeMetric(final ThreadContext con
691683
return Optional.of((NumberGauge) delegatingGauge.getMetric().get());
692684
}
693685

694-
// private Optional<TextGauge> initOrGetTextGaugeMetric(final ThreadContext context,
695-
// final RubySymbol[] subPipelineNamespacePath,
696-
// final RubySymbol metricName) {
697-
// final IRubyObject collector = this.metric.collector(context);
698-
// final IRubyObject fullNamespace = pipelineNamespacedPath(subPipelineNamespacePath);
699-
// final IRubyObject retrievedMetric = collector.callMethod(context, "get", new IRubyObject[]{fullNamespace, metricName, context.runtime.newSymbol("gauge")});
700-
//
701-
// LazyDelegatingGauge delegatingGauge = retrievedMetric.toJava(LazyDelegatingGauge.class);
702-
// if (Objects.isNull(delegatingGauge.getType()) || delegatingGauge.getType() != MetricType.GAUGE_TEXT) {
703-
// return Optional.empty();
704-
// }
705-
//
706-
// return Optional.of((TextGauge) delegatingGauge.getMetric().get());
707-
// }
708-
709686
private UptimeMetric initOrGetUptimeMetric(final ThreadContext context,
710687
final RubySymbol[] subPipelineNamespacePath,
711688
final RubySymbol uptimeMetricName) {

0 commit comments

Comments
 (0)