This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit be94fddf51501601176a07c8e21c4503a8cc484d Author: Claus Ibsen <[email protected]> AuthorDate: Wed Oct 26 13:32:53 2022 +0200 CAMEL-18650: camel-micrometer - Polished --- .../camel/component/micrometer/DistributionSummaryProducer.java | 6 ------ .../java/org/apache/camel/component/micrometer/TimerProducer.java | 8 -------- 2 files changed, 14 deletions(-) diff --git a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/DistributionSummaryProducer.java b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/DistributionSummaryProducer.java index 181cd788cd0..830f1009870 100644 --- a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/DistributionSummaryProducer.java +++ b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/DistributionSummaryProducer.java @@ -22,15 +22,11 @@ import io.micrometer.core.instrument.DistributionSummary; import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.core.instrument.Tag; import org.apache.camel.Exchange; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.apache.camel.component.micrometer.MicrometerConstants.HEADER_HISTOGRAM_VALUE; public class DistributionSummaryProducer extends AbstractMicrometerProducer<DistributionSummary> { - private static final Logger LOG = LoggerFactory.getLogger(DistributionSummaryProducer.class); - public DistributionSummaryProducer(MicrometerEndpoint endpoint) { super(endpoint); } @@ -46,8 +42,6 @@ public class DistributionSummaryProducer extends AbstractMicrometerProducer<Dist Double finalValue = getDoubleHeader(exchange.getIn(), HEADER_HISTOGRAM_VALUE, value); if (finalValue != null) { summary.record(finalValue); - } else { - LOG.warn("Cannot update histogram \"{}\" with null value", summary.getId().getName()); } } } diff --git a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/TimerProducer.java b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/TimerProducer.java index e7205493559..cc7d05640fd 100644 --- a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/TimerProducer.java +++ b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/TimerProducer.java @@ -23,15 +23,11 @@ import io.micrometer.core.instrument.Tag; import io.micrometer.core.instrument.Timer; import org.apache.camel.Exchange; import org.apache.camel.Message; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import static org.apache.camel.component.micrometer.MicrometerConstants.HEADER_TIMER_ACTION; public class TimerProducer extends AbstractMicrometerProducer<Timer> { - private static final Logger LOG = LoggerFactory.getLogger(TimerProducer.class); - public TimerProducer(MicrometerEndpoint endpoint) { super(endpoint); } @@ -59,8 +55,6 @@ public class TimerProducer extends AbstractMicrometerProducer<Timer> { handleStart(exchange, registry, metricsName); } else if (finalAction == MicrometerTimerAction.stop) { handleStop(exchange, metricsName, tags); - } else { - LOG.warn("No action provided for timer \"{}\"", metricsName); } } @@ -76,8 +70,6 @@ public class TimerProducer extends AbstractMicrometerProducer<Timer> { if (sample == null) { sample = Timer.start(registry); exchange.setProperty(propertyName, sample); - } else { - LOG.warn("Timer \"{}\" already running", metricsName); } }
