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 Details

  • Method Details

    • end

    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
      To enable Micrometer metrics.
    • getNamingStrategy

      public String getNamingStrategy()
    • setNamingStrategy

      public void setNamingStrategy(String namingStrategy)
      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

      public String getRoutePolicyLevel()
    • setRoutePolicyLevel

      public void setRoutePolicyLevel(String routePolicyLevel)
      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

      public String getTextFormatVersion()
    • setTextFormatVersion

      public void setTextFormatVersion(String textFormatVersion)
      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

      public String getBinders()
    • setBinders

      public void setBinders(String binders)
      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 interface AutoCloseable
      Specified by:
      close in interface Closeable
    • withEnableRoutePolicy

      public MetricsConfigurationProperties withEnableRoutePolicy(boolean enableRoutePolicy)
      Set whether to enable the MicrometerRoutePolicyFactory for capturing metrics on route processing times.
    • withRoutePolicyLevel

      public MetricsConfigurationProperties withRoutePolicyLevel(String routePolicyLevel)
      Sets the level of information to capture. all = both context and routes.
    • withEnabled

      public MetricsConfigurationProperties withEnabled(boolean enabled)
      To enable Micrometer metrics.
    • withNamingStrategy

      public MetricsConfigurationProperties withNamingStrategy(String namingStrategy)
      Controls the name style to use for metrics. Default = uses micrometer naming convention. Legacy = uses the classic naming style (camelCase)
    • withEnableMessageHistory

      public MetricsConfigurationProperties withEnableMessageHistory(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.
    • 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

      public MetricsConfigurationProperties withClearOnReload(boolean clearOnReload)
      Clear the captured metrics data when Camel is reloading routes such as when using Camel JBang.
    • withTextFormatVersion

      public MetricsConfigurationProperties withTextFormatVersion(String textFormatVersion)
      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

      public MetricsConfigurationProperties withBinders(String binders)
      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