Class MetricsConfigurationEnhancer
java.lang.Object
org.axonframework.extension.metrics.dropwizard.MetricsConfigurationEnhancer
- All Implemented Interfaces:
ConfigurationEnhancer
Implementation of the
ConfigurationEnhancer that uses the MetricRegistry to decorate several
components with MessageMonitors with unique MetricRegistries by registering
MessageMonitorFactories with the
MessageMonitorRegistry.
Components that are decorated are:
- Any
CommandBusimplementation present in theComponentRegistryreceives a}, andinvalid @link
{@link MessageCountingMonitor), {@link MessageTimerMonitorCapacityMonitor. - Any
EventSinkimplementation present in theComponentRegistryreceives a invalid input: '{@code MessageCountingMonitor) and {@code MessageTimerMonitor}.</li> <li>Any {@link EventProcessor} implementation present in the {@link ComponentRegistry} receives a {@code MessageCountingMonitor), {@code MessageTimerMonitor}, {@code CapacityMonitor}, and {@link EventProcessorLatencyMonitor}.</li> <li>Any {@link QueryBus} implementation present in the {@link ComponentRegistry} receives a {@code MessageCountingMonitor), {@code MessageTimerMonitor}, and {@code CapacityMonitor}.</li> </ul> @author Rene de Waele @author Steven van Beelen @since 3.2.0'
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe order ofthisenhancer, set to-1024. -
Constructor Summary
ConstructorsConstructorDescriptionInitializes a newMetricsConfigurationEnhancerconstructingMessageMonitorsthat are registered with a newMetricRegistrywith default settings.MetricsConfigurationEnhancer(io.dropwizard.metrics5.MetricRegistry registry) Initializes a newMetricsConfigurationEnhancerconstructingMessageMonitorsthat are registered with the givenregistry. -
Method Summary
Modifier and TypeMethodDescriptionvoidenhance(ComponentRegistry registry) intorder()Returns the relative order this enhancer should be invoked in, compared to other instances.
-
Field Details
-
ENHANCER_ORDER
public static final int ENHANCER_ORDERThe order ofthisenhancer, set to-1024.- See Also:
-
-
Constructor Details
-
MetricsConfigurationEnhancer
public MetricsConfigurationEnhancer()Initializes a newMetricsConfigurationEnhancerconstructingMessageMonitorsthat are registered with a newMetricRegistrywith default settings. -
MetricsConfigurationEnhancer
public MetricsConfigurationEnhancer(io.dropwizard.metrics5.MetricRegistry registry) Initializes a newMetricsConfigurationEnhancerconstructingMessageMonitorsthat are registered with the givenregistry.- Parameters:
registry- theMetricRegistrywhich will record the metrics
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
registry- The registry instance to enhance.
-
order
public int order()Description copied from interface:ConfigurationEnhancerReturns the relative order this enhancer should be invoked in, compared to other instances.Use lower (negative) values for enhancers providing sensible defaults, and higher values for enhancers that should be able to override values potentially previously set. Defaults to
0when not set.- Specified by:
orderin interfaceConfigurationEnhancer- Returns:
- The order in which this enhancer should be invoked.
-