public class GlobalMetricRegistry extends Object
| Constructor and Description |
|---|
GlobalMetricRegistry()
Initializes a new
GlobalMetricRegistry delegating to a new MetricRegistry with default settings. |
GlobalMetricRegistry(com.codahale.metrics.MetricRegistry metricRegistry)
Initializes a
GlobalMetricRegistry delegating to the given metricRegistry. |
| Modifier and Type | Method and Description |
|---|---|
com.codahale.metrics.MetricRegistry |
getRegistry()
Returns the global
MetricRegistry to which components are registered. |
MessageMonitor<? super CommandMessage<?>> |
registerCommandBus(String commandBusName)
Registers new metrics to the registry to monitor a
CommandBus. |
MessageMonitor<? extends Message<?>> |
registerComponent(Class<?> componentType,
String componentName)
Registers new metrics to the
MetricRegistry to monitor a component of given componentType. |
MessageMonitor<? super EventMessage<?>> |
registerEventBus(String eventBusName)
Registers new metrics to the registry to monitor an
EventBus. |
MessageMonitor<? super EventMessage<?>> |
registerEventProcessor(String eventProcessorName)
Registers new metrics to the registry to monitor an
EventProcessor. |
MessageMonitor<? super QueryMessage<?,?>> |
registerQueryBus(String queryBusName)
Registers new metrics to the registry to monitor a
QueryBus. |
Configurer |
registerWithConfigurer(Configurer configurer)
Registers the configured
MetricRegistry with the given configurer via Configurer.configureMessageMonitor(Function). |
public GlobalMetricRegistry()
GlobalMetricRegistry delegating to a new MetricRegistry with default settings.public GlobalMetricRegistry(com.codahale.metrics.MetricRegistry metricRegistry)
GlobalMetricRegistry delegating to the given metricRegistry.metricRegistry - the MetricRegistry which will record the metricspublic Configurer registerWithConfigurer(Configurer configurer)
MetricRegistry with the given configurer via Configurer.configureMessageMonitor(Function). Components registered by the Configurer will be added by
invocation of registerComponent(Class, String).configurer - the application's ConfigurerConfigurer, with the new registration applied, for chainingpublic MessageMonitor<? extends Message<?>> registerComponent(Class<?> componentType, String componentName)
MetricRegistry to monitor a component of given componentType. The
monitor will be registered with the registry under the given componentName. The returned MessageMonitor can be installed on the component to initiate the monitoring.componentType - the type of component to registercomponentName - the name under which the component should be registered to the registryMessageMonitor to monitor the behavior of the given componentTypepublic MessageMonitor<? super EventMessage<?>> registerEventProcessor(String eventProcessorName)
EventProcessor. The monitor will be registered with
the registry under the given eventProcessorName. The returned MessageMonitor can be installed on
the EventProcessor to initiate the monitoring.eventProcessorName - the name under which the EventProcessor should be registered to the registryMessageMonitor to monitor the behavior of an EventProcessorpublic MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName)
CommandBus. The monitor will be registered with the
registry under the given commandBusName. The returned MessageMonitor can be installed on the
CommandBus to initiate the monitoring.commandBusName - the name under which the commandBus should be registered to the registryMessageMonitor to monitor the behavior of a CommandBuspublic MessageMonitor<? super EventMessage<?>> registerEventBus(String eventBusName)
EventBus. The monitor will be registered with the
registry under the given eventBusName. The returned MessageMonitor can be installed on the EventBus to initiate the monitoring.eventBusName - the name under which the EventBus should be registered to the registryMessageMonitor to monitor the behavior of an EventBuspublic MessageMonitor<? super QueryMessage<?,?>> registerQueryBus(String queryBusName)
QueryBus. The monitor will be registered with the
registry under the given queryBusName. The returned MessageMonitor can be installed on the QueryBus to initiate the monitoring.queryBusName - the name under which the QueryBus should be registered to the registryMessageMonitor to monitor the behavior of a QueryBuspublic com.codahale.metrics.MetricRegistry getRegistry()
MetricRegistry to which components are registered.Copyright © 2010–2023. All rights reserved.