Package org.apache.camel.main
Class MetricsConfigurationProperties
java.lang.Object
org.apache.camel.main.MetricsConfigurationProperties
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.camel.spi.BootstrapCloseable
@Configurer(bootstrap=true)
public class MetricsConfigurationProperties
extends Object
implements org.apache.camel.spi.BootstrapCloseable
Global configuration for Micrometer Metrics.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
end()
boolean
boolean
boolean
boolean
boolean
boolean
void
setBinders
(String binders) Additional Micrometer binders to include such as jvm-memory, processor, jvm-thread, and so forth.void
setClearOnReload
(boolean clearOnReload) Clear the captured metrics data when Camel is reloading routes such as when using Camel JBang.void
setEnabled
(boolean enabled) To enable Micrometer metrics.void
setEnableExchangeEventNotifier
(boolean enableExchangeEventNotifier) Set whether to enable the MicrometerExchangeEventNotifier for capturing metrics on exchange processing times.void
setEnableMessageHistory
(boolean enableMessageHistory) Set whether to enable the MicrometerMessageHistoryFactory for capturing metrics on individual route node processing times.void
setEnableRouteEventNotifier
(boolean enableRouteEventNotifier) Set whether to enable the MicrometerRouteEventNotifier for capturing metrics on the total number of routes and total number of routes running.void
setEnableRoutePolicy
(boolean enableRoutePolicy) Set whether to enable the MicrometerRoutePolicyFactory for capturing metrics on route processing times.void
setNamingStrategy
(String namingStrategy) Controls the name style to use for metrics.void
setRoutePolicyLevel
(String routePolicyLevel) Sets the level of information to capture.void
setTextFormatVersion
(String textFormatVersion) The text-format version to use with Prometheus scraping.withBinders
(String binders) Additional Micrometer binders to include such as jvm-memory, processor, jvm-thread, and so forth.withClearOnReload
(boolean clearOnReload) Clear the captured metrics data when Camel is reloading routes such as when using Camel JBang.witheEnableRouteEventNotifier
(boolean enableRouteEventNotifier) Set whether to enable the MicrometerRouteEventNotifier for capturing metrics on the total number of routes and total number of routes running.withEnabled
(boolean enabled) To enable Micrometer metrics.withEnableExchangeEventNotifier
(boolean enableExchangeEventNotifier) Set whether to enable the MicrometerExchangeEventNotifier for capturing metrics on exchange processing times.withEnableMessageHistory
(boolean enableMessageHistory) Set whether to enable the MicrometerMessageHistoryFactory for capturing metrics on individual route node processing times.withEnableRoutePolicy
(boolean enableRoutePolicy) Set whether to enable the MicrometerRoutePolicyFactory for capturing metrics on route processing times.withNamingStrategy
(String namingStrategy) Controls the name style to use for metrics.withRoutePolicyLevel
(String routePolicyLevel) Sets the level of information to capture.withTextFormatVersion
(String textFormatVersion) The text-format version to use with Prometheus scraping.
-
Constructor Details
-
MetricsConfigurationProperties
-
-
Method Details
-
end
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) To enable Micrometer metrics. -
getNamingStrategy
-
setNamingStrategy
Controls the name style to use for metrics. Default = uses micrometer naming convention. Legacy = uses the classic naming style (camelCase) -
isEnableRoutePolicy
public boolean isEnableRoutePolicy() -
setEnableRoutePolicy
public void setEnableRoutePolicy(boolean enableRoutePolicy) Set whether to enable the MicrometerRoutePolicyFactory for capturing metrics on route processing times. -
getRoutePolicyLevel
-
setRoutePolicyLevel
Sets the level of information to capture. all = both context and routes. -
isEnableMessageHistory
public boolean isEnableMessageHistory() -
setEnableMessageHistory
public void setEnableMessageHistory(boolean enableMessageHistory) 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. -
isEnableExchangeEventNotifier
public boolean isEnableExchangeEventNotifier() -
setEnableExchangeEventNotifier
public void setEnableExchangeEventNotifier(boolean enableExchangeEventNotifier) Set whether to enable the MicrometerExchangeEventNotifier for capturing metrics on exchange processing times. -
isEnableRouteEventNotifier
public boolean isEnableRouteEventNotifier() -
setEnableRouteEventNotifier
public void setEnableRouteEventNotifier(boolean enableRouteEventNotifier) Set whether to enable the MicrometerRouteEventNotifier for capturing metrics on the total number of routes and total number of routes running. -
isClearOnReload
public boolean isClearOnReload() -
setClearOnReload
public void setClearOnReload(boolean clearOnReload) Clear the captured metrics data when Camel is reloading routes such as when using Camel JBang. -
getTextFormatVersion
-
setTextFormatVersion
The text-format version to use with Prometheus scraping. 0.0.4 = text/plain; version=0.0.4; charset=utf-8 1.0.0 = application/openmetrics-text; version=1.0.0; charset=utf-8 -
getBinders
-
setBinders
Additional Micrometer binders to include such as jvm-memory, processor, jvm-thread, and so forth. Multiple binders can be separated by comma. The following binders currently is available from Micrometer: class-loader, commons-object-pool2, file-descriptor, hystrix-metrics-binder, jvm-compilation, jvm-gc, jvm-heap-pressure, jvm-info, jvm-memory, jvm-thread, log4j2, logback, processor, uptime -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
withEnableRoutePolicy
Set whether to enable the MicrometerRoutePolicyFactory for capturing metrics on route processing times. -
withRoutePolicyLevel
Sets the level of information to capture. all = both context and routes. -
withEnabled
To enable Micrometer metrics. -
withNamingStrategy
Controls the name style to use for metrics. Default = uses micrometer naming convention. Legacy = uses the classic naming style (camelCase) -
withEnableMessageHistory
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. -
withEnableExchangeEventNotifier
public MetricsConfigurationProperties withEnableExchangeEventNotifier(boolean enableExchangeEventNotifier) Set whether to enable the MicrometerExchangeEventNotifier for capturing metrics on exchange processing times. -
witheEnableRouteEventNotifier
public MetricsConfigurationProperties witheEnableRouteEventNotifier(boolean enableRouteEventNotifier) Set whether to enable the MicrometerRouteEventNotifier for capturing metrics on the total number of routes and total number of routes running. -
withClearOnReload
Clear the captured metrics data when Camel is reloading routes such as when using Camel JBang. -
withTextFormatVersion
The text-format version to use with Prometheus scraping. 0.0.4 = text/plain; version=0.0.4; charset=utf-8 1.0.0 = application/openmetrics-text; version=1.0.0; charset=utf-8 -
withBinders
Additional Micrometer binders to include such as jvm-memory, processor, jvm-thread, and so forth. Multiple binders can be separated by comma. The following binders currently is available from Micrometer: class-loader, commons-object-pool2, file-descriptor, hystrix-metrics-binder, jvm-compilation, jvm-gc, jvm-heap-pressure, jvm-info, jvm-memory, jvm-thread, log4j2, logback, processor, uptime
-