MicroProfile Metrics
Since Camel Quarkus 0.2.0, JVM and native
Expose metrics from Camel routes.
What’s inside
-
MicroProfile Metrics component, URI syntax:
microprofile-metrics:metricType:metricName
Please refer to the above link for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-microprofile-metrics</artifactId>
</dependency>
Check the User guide for more information about writing Camel Quarkus applications.
Usage
The microprofile-metrics component automatically exposes a set of Camel application metrics. Some of these include:
Camel Context metrics
Metric Name | Type |
---|---|
The status of the Camel Context represented by the |
Gauge |
The Camel Context uptime in milliseconds |
Gauge |
The total number of completed exchanges |
Counter |
The total number of failed exchanges |
Counter |
The total number of inflight exchanges |
Gauge |
The total number of all exchanges |
Counter |
The total number of all external redeliveries |
Counter |
The total number of all failures handled |
Counter |
Camel Route metrics
Metric Name | Type |
---|---|
The number of routes |
Gauge |
The number of running routes |
Gauge |
The total number of completed exchanges for the route |
Counter |
The total number of failed exchanges for the route |
Counter |
The total number of inflight exchanges for the route |
Gauge |
The total number of all exchanges for the route |
Counter |
The total number of all external redeliveries for the route |
Counter |
The total number of all failures handled for the route |
Counter |
All metrics are tagged with the name of the Camel Context and the id of the route where applicable.
You can also produce your own customized metrics in your Camel routes. For more information, refer to the microprofile-metrics component documentation.
Metrics are exposed to Quarkus as application metrics and they can be browsed at http://localhost:8080/metrics/application.
Additional Camel Quarkus configuration
The Camel MicroProfile Metrics extension exposes the following configuration properties.
Configuration property | Type | Default |
---|---|---|
Set whether to enable the |
boolean |
|
Set whether to enable the 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 |
|
Set whether to enable the |
boolean |
|
Set whether to enable the |
boolean |
|
Set whether to enable the |
boolean |
|