public class GlobalMetricRegistry extends Object
Constructor and Description |
---|
GlobalMetricRegistry()
Initializes a new
GlobalMetricRegistry delegating to a new MeterRegistry with default settings. |
GlobalMetricRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry)
Initializes a
GlobalMetricRegistry delegating to the given meterRegistry . |
Modifier and Type | Method and Description |
---|---|
io.micrometer.core.instrument.MeterRegistry |
getRegistry()
Returns the global
MeterRegistry to which components are registered. |
MessageMonitor<? super CommandMessage<?>> |
registerCommandBus(String commandBusName)
Registers new metrics to the registry to monitor a
CommandBus . |
MessageMonitor<? super CommandMessage<?>> |
registerCommandBus(String commandBusName,
Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
Registers new metrics to the registry to monitor a
CommandBus using Tag s through the given tagsBuilder . |
MessageMonitor<? extends Message<?>> |
registerComponent(Class<?> componentType,
String componentName)
Registers new metrics to the registry to monitor a component of the given
componentType . |
MessageMonitor<? extends Message<?>> |
registerComponentWithDefaultTags(Class<?> componentType,
String componentName)
Registers new metrics to the registry to monitor a component of the given
componentType . |
MessageMonitor<? super EventMessage<?>> |
registerEventBus(String eventBusName)
Registers new metrics to the registry to monitor an
EventBus . |
MessageMonitor<? super EventMessage<?>> |
registerEventBus(String eventBusName,
Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
Registers new metrics to the registry to monitor an
EventBus using Tag s through the given tagsBuilder . |
MessageMonitor<? super EventMessage<?>> |
registerEventProcessor(String eventProcessorName)
Registers new metrics to the registry to monitor an
EventProcessor . |
MessageMonitor<? super EventMessage<?>> |
registerEventProcessor(String eventProcessorName,
Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
Registers new metrics to the registry to monitor an
EventProcessor using Tag s through the given
tagsBuilder . |
MessageMonitor<? super QueryMessage<?,?>> |
registerQueryBus(String queryBusName)
Registers new metrics to the registry to monitor a
QueryBus . |
MessageMonitor<? super QueryMessage<?,?>> |
registerQueryBus(String queryBusName,
Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
Registers new metrics to the registry to monitor a
QueryBus using Tag s through the given tagsBuilder . |
Configurer |
registerWithConfigurer(Configurer configurer)
Registers the
MeterRegistry with the given configurer via Configurer.configureMessageMonitor(Function) . |
Configurer |
registerWithConfigurerWithDefaultTags(Configurer configurer)
Registers the
MeterRegistry with the given configurer via Configurer.configureMessageMonitor(Function) . |
public GlobalMetricRegistry()
GlobalMetricRegistry
delegating to a new MeterRegistry
with default settings.public GlobalMetricRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry)
GlobalMetricRegistry
delegating to the given meterRegistry
.meterRegistry
- the MeterRegistry
which will record the metricspublic Configurer registerWithConfigurer(Configurer configurer)
MeterRegistry
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 Configurer
Configurer
, with the new registration applied, for chainingpublic Configurer registerWithConfigurerWithDefaultTags(Configurer configurer)
MeterRegistry
with the given configurer
via Configurer.configureMessageMonitor(Function)
. Components registered by the Configurer
will be added by
invocation of registerComponentWithDefaultTags(Class, String)
.configurer
- the application's Configurer
Configurer
, with the new registration applied using Tag
s, for chainingpublic MessageMonitor<? extends Message<?>> registerComponent(Class<?> componentType, String componentName)
componentType
. The monitor will
be registered with the MeterRegistry
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 a given componentType
public 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 EventProcessor
public 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 CommandBus
public 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 EventBus
public 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 QueryBus
public MessageMonitor<? extends Message<?>> registerComponentWithDefaultTags(Class<?> componentType, String componentName)
componentType
. The monitor will
be registered with the registry under the given componentName
, utilizing Tag
s. The default set of
Tag
s includes the 'message payload type' and additionally the 'processor name' for the EventProcessor
instances. 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
with Tag
s enabled to monitor the behavior of the given componentType
public MessageMonitor<? super EventMessage<?>> registerEventProcessor(String eventProcessorName, Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
EventProcessor
using Tag
s through the given
tagsBuilder
. 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 registrytagsBuilder
- the function used to construct the list of Tag
, based on the ingested messageMessageMonitor
to monitor the behavior of an EventProcessor
public MessageMonitor<? super CommandMessage<?>> registerCommandBus(String commandBusName, Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
CommandBus
using Tag
s through the given tagsBuilder
. 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 registrytagsBuilder
- the function used to construct the list of Tag
, based on the ingested messageMessageMonitor
to monitor the behavior of a CommandBus
public MessageMonitor<? super EventMessage<?>> registerEventBus(String eventBusName, Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
EventBus
using Tag
s through the given tagsBuilder
. 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 registrytagsBuilder
- the function used to construct the list of Tag
, based on the ingested messageMessageMonitor
to monitor the behavior of an EventBus
public MessageMonitor<? super QueryMessage<?,?>> registerQueryBus(String queryBusName, Function<Message<?>,Iterable<io.micrometer.core.instrument.Tag>> tagsBuilder)
QueryBus
using Tag
s through the given tagsBuilder
. 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 registrytagsBuilder
- the function used to construct the list of Tag
, based on the ingested messageMessageMonitor
to monitor the behavior of a QueryBus
public io.micrometer.core.instrument.MeterRegistry getRegistry()
MeterRegistry
to which components are registered.Copyright © 2010–2020. All rights reserved.