Micrometer

JVM since1.5.0 Native since1.5.0

Collect various metrics directly from Camel routes using the Micrometer library.

What’s inside

Please refer to the above link for usage and configuration details.

Maven coordinates

Or add the coordinates to your existing project:

<dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifactId>camel-quarkus-micrometer</artifactId>
</dependency>

Check the User guide for more information about writing Camel Quarkus applications.

Usage

This extension leverages Quarkus Micrometer. Quarkus supports a variety of Micrometer metric registry implementations.

Your application should declare the following dependency or one of the dependencies listed in the quarkiverse documentation, depending on the monitoring solution you want to work with.

<dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-registry-prometheus</artifactId>
</dependency>

If no dependency is declared, the Micrometer extension creates a SimpleMeterRegistry instance, suitable mainly for testing.

Camel Quarkus limitations

Exposing Micrometer statistics in JMX

Exposing Micrometer statistics in JMX is not available in native mode as quarkus-micrometer-registry-jmx does not have native support at present.

Decrement header for Counter is ignored by Prometheus

Prometheus backend ignores negative values during increment of Counter metrics.

Exposing statistics in JMX

In Camel Quarkus, registering a JmxMeterRegistry is simplified. Add a dependency for io.quarkiverse.micrometer.registry:quarkus-micrometer-registry-jmx and a JmxMeterRegistry will automatically get created for you.

Additional Camel Quarkus configuration

Configuration property Type Default

quarkus.camel.metrics.enable-route-policy

Set whether to enable the MicrometerRoutePolicyFactory for capturing metrics on route processing times.

boolean

true

quarkus.camel.metrics.enable-message-history

Set whether to enable the MicrometerMessageHistoryFactory for capturing metrics on individual route node processing times. Depending on the number of configured route nodes, there is the potential to create a large volume of metrics. Therefore, this option is disabled by default.

boolean

false

quarkus.camel.metrics.enable-exchange-event-notifier

Set whether to enable the MicrometerExchangeEventNotifier for capturing metrics on exchange processing times.

boolean

true

quarkus.camel.metrics.enable-route-event-notifier

Set whether to enable the MicrometerRouteEventNotifier for capturing metrics on the total number of routes and total number of routes running.

boolean

true

quarkus.camel.metrics.enable-instrumented-thread-pool-factory

Set whether to gather performance information about Camel Thread Pools by injecting an InstrumentedThreadPoolFactory.

boolean

false

Configuration property fixed at build time. All other configuration properties are overridable at runtime.