blob: 3a905593ede1d49648ab41810c01e34e12a6ad2c [file] [log] [blame]
// Do not edit directly!
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
[id="extensions-micrometer"]
= Micrometer
:linkattrs:
:cq-artifact-id: camel-quarkus-micrometer
:cq-native-supported: true
:cq-status: Stable
:cq-status-deprecation: Stable
:cq-description: Collect various metrics directly from Camel routes using the Micrometer library.
:cq-deprecated: false
:cq-jvm-since: 1.5.0
:cq-native-since: 1.5.0
ifeval::[{doc-show-badges} == true]
[.badges]
[.badge-key]##JVM since##[.badge-supported]##1.5.0## [.badge-key]##Native since##[.badge-supported]##1.5.0##
endif::[]
Collect various metrics directly from Camel routes using the Micrometer library.
[id="extensions-micrometer-whats-inside"]
== What's inside
* xref:{cq-camel-components}::micrometer-component.adoc[Micrometer component], URI syntax: `micrometer:metricsType:metricsName`
Please refer to the above link for usage and configuration details.
[id="extensions-micrometer-maven-coordinates"]
== Maven coordinates
https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-micrometer[Create a new project with this extension on {link-quarkus-code-generator}, window="_blank"]
Or add the coordinates to your existing project:
[source,xml]
----
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-micrometer</artifactId>
</dependency>
----
ifeval::[{doc-show-user-guide-link} == true]
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
endif::[]
[id="extensions-micrometer-usage"]
== Usage
This extension leverages https://quarkus.io/guides/micrometer[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 https://quarkiverse.github.io/quarkiverse-docs/quarkus-micrometer-registry/dev/index.html[quarkiverse documentation], depending on the monitoring solution you want to work with.
[source,xml]
----
<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.
[id="extensions-micrometer-camel-quarkus-limitations"]
== Camel Quarkus limitations
[id="extensions-micrometer-limitations-exposing-micrometer-statistics-in-jmx"]
=== 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.
[id="extensions-micrometer-limitations-decrement-header-for-counter-is-ignored-by-prometheus"]
=== Decrement header for Counter is ignored by Prometheus
Prometheus backend ignores negative values during increment of Counter metrics.
[id="extensions-micrometer-limitations-exposing-statistics-in-jmx"]
=== 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.
[id="extensions-micrometer-additional-camel-quarkus-configuration"]
== Additional Camel Quarkus configuration
[width="100%",cols="80,5,15",options="header"]
|===
| Configuration property | Type | Default
|icon:lock[title=Fixed at build time] [[quarkus.camel.metrics.enable-route-policy]]`link:#quarkus.camel.metrics.enable-route-policy[quarkus.camel.metrics.enable-route-policy]`
Set whether to enable the MicrometerRoutePolicyFactory for capturing metrics on route processing times.
| `boolean`
| `true`
|icon:lock[title=Fixed at build time] [[quarkus.camel.metrics.enable-message-history]]`link:#quarkus.camel.metrics.enable-message-history[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`
|icon:lock[title=Fixed at build time] [[quarkus.camel.metrics.enable-exchange-event-notifier]]`link:#quarkus.camel.metrics.enable-exchange-event-notifier[quarkus.camel.metrics.enable-exchange-event-notifier]`
Set whether to enable the MicrometerExchangeEventNotifier for capturing metrics on exchange processing times.
| `boolean`
| `true`
|icon:lock[title=Fixed at build time] [[quarkus.camel.metrics.enable-route-event-notifier]]`link:#quarkus.camel.metrics.enable-route-event-notifier[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`
|icon:lock[title=Fixed at build time] [[quarkus.camel.metrics.enable-instrumented-thread-pool-factory]]`link:#quarkus.camel.metrics.enable-instrumented-thread-pool-factory[quarkus.camel.metrics.enable-instrumented-thread-pool-factory]`
Set whether to gather performance information about Camel Thread Pools by injecting an InstrumentedThreadPoolFactory.
| `boolean`
| `false`
|icon:lock[title=Fixed at build time] [[quarkus.camel.metrics.naming-strategy]]`link:#quarkus.camel.metrics.naming-strategy[quarkus.camel.metrics.naming-strategy]`
Controls the naming style to use for metrics. The available values are `default` and `legacy`. `default` uses the default Micrometer naming convention. `legacy` uses the legacy camel-case naming style.
| `org.apache.camel.quarkus.component.micrometer.CamelMicrometerConfig.MetricsNamingStrategy`
| `default`
|icon:lock[title=Fixed at build time] [[quarkus.camel.metrics.route-policy-level]]`link:#quarkus.camel.metrics.route-policy-level[quarkus.camel.metrics.route-policy-level]`
Sets the level of metrics to capture. The available values are `all` ,`context` and `route`. `all` captures metrics for both the camel context and routes. `route` captures metrics for routes only. `context` captures metrics for the camel context only.
| `org.apache.camel.quarkus.component.micrometer.CamelMicrometerConfig.RoutePolicyLevel`
| `all`
|===
[.configuration-legend]
{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed at build time. All other configuration properties are overridable at runtime.