Class DropwizardMetricsAutoConfiguration

java.lang.Object
org.axonframework.extension.metrics.dropwizard.springboot.DropwizardMetricsAutoConfiguration

@AutoConfiguration @AutoConfigureBefore(AxonAutoConfiguration.class) @ConditionalOnClass(name={"org.axonframework.extension.springboot.autoconfig.AxonAutoConfiguration","io.dropwizard.metrics5.MetricRegistry"}) @EnableConfigurationProperties(MetricsProperties.class) public class DropwizardMetricsAutoConfiguration extends Object
Autoconfiguration to set up metrics for the infrastructure components.
Since:
3.2.0
Author:
Steven van Beelen
  • Constructor Details

    • DropwizardMetricsAutoConfiguration

      public DropwizardMetricsAutoConfiguration()
  • Method Details

    • metricRegistry

      @Bean @ConditionalOnMissingBean(io.dropwizard.metrics5.MetricRegistry.class) @ConditionalOnProperty(value="axon.metrics.enabled", havingValue="true", matchIfMissing=true) public io.dropwizard.metrics5.MetricRegistry metricRegistry()
      Bean creation method constructing a Dropwizard MetricRegistry for the MetricsConfigurationEnhancer.
      Returns:
      a Dropwizard MetricRegistry to be used by the MetricsConfigurationEnhancer
    • metricsConfigurationEnhancer

      @Bean @ConditionalOnMissingBean @ConditionalOnProperty(value="axon.metrics.enabled", havingValue="true", matchIfMissing=true) public MetricsConfigurationEnhancer metricsConfigurationEnhancer(io.dropwizard.metrics5.MetricRegistry registry)
      Bean creation method constructing a MetricsConfigurationEnhancer with the given registry, which will attach a default set of MessageMonitors to Axon's infrastructure components.
      Parameters:
      registry - the MetricRegistry to be used by the MetricsConfigurationEnhancer to register metrics with
      Returns:
      a MetricsConfigurationEnhancer that will attach a default set of MessageMonitors to Axon's infrastructure components
    • disableMetricsConfigurationEnhancer

      @Bean @ConditionalOnProperty(name="axon.metrics.enabled", havingValue="false") public ConfigurationEnhancer disableMetricsConfigurationEnhancer()
      Bean creation method constructing a ConfigurationEnhancer that disables MetricsConfigurationEnhancer that is only constructed when axon.metrics.enabled is set to false.
      Returns:
      a ConfigurationEnhancer MetricsConfigurationEnhancer that is only constructed when axon.metrics.enabled is set to false