2.80. Micrometer
Collect various metrics directly from Camel routes using the Micrometer library.
2.80.1. What’s inside 复制链接链接已复制到粘贴板!
-
Micrometer component, URI syntax:
micrometer:metricsType:metricsName
Refer to the above link for usage and configuration details.
2.80.2. Maven coordinates 复制链接链接已复制到粘贴板!
Create a new project with this extension on code.camel.redhat.com
Or add the coordinates to your existing project:
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-micrometer</artifactId>
</dependency>
2.80.3. 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.quarkus</groupId>
<artifactId>quarkus-micrometer-registry-prometheus</artifactId>
</dependency>
If no dependency is declared, the Micrometer extension creates a SimpleMeterRegistry instance, suitable mainly for testing.
2.80.4. Camel Quarkus limitations 复制链接链接已复制到粘贴板!
2.80.4.1. 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.
Prometheus backend ignores negative values during increment of Counter metrics.
2.80.4.3. Exposing statistics in JMX 复制链接链接已复制到粘贴板!
In {project-name}, 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.
2.80.5. Additional Camel Quarkus configuration 复制链接链接已复制到粘贴板!
| Configuration property | Type | Default |
|---|---|---|
|
Set whether to enable the MicrometerRoutePolicyFactory for capturing metrics on route processing times. |
|
|
|
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. |
|
|
|
Set whether to enable the MicrometerExchangeEventNotifier for capturing metrics on exchange processing times. |
|
|
|
Set whether to enable the MicrometerRouteEventNotifier for capturing metrics on the total number of routes and total number of routes running. |
|
|
|
Set whether to gather performance information about Camel Thread Pools by injecting an InstrumentedThreadPoolFactory. |
|
|
|
Controls the naming style to use for metrics. The available values are |
|
|
|
Sets the level of metrics to capture. The available values are |
|
|
Configuration property fixed at build time. All other configuration properties are overridable at runtime.