Package com.rabbitmq.client.impl
Class MicrometerMetricsCollector
java.lang.Object
com.rabbitmq.client.impl.AbstractMetricsCollector
com.rabbitmq.client.impl.MicrometerMetricsCollector
- All Implemented Interfaces:
MetricsCollector
Micrometer implementation of
MetricsCollector.
Note transactions are not supported (see MetricsCollector.
Micrometer provides out-of-the-box support for report backends like JMX,
Graphite, Ganglia, Atlas, Datadog, etc. See Micrometer documentation for
more details.
Note Micrometer requires Java 8 or more, so does this MetricsCollector.- Since:
- 4.3.0
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMicrometerMetricsCollector(io.micrometer.core.instrument.MeterRegistry registry) MicrometerMetricsCollector(io.micrometer.core.instrument.MeterRegistry registry, String prefix) MicrometerMetricsCollector(io.micrometer.core.instrument.MeterRegistry registry, String prefix, Iterable<io.micrometer.core.instrument.Tag> tags) MicrometerMetricsCollector(io.micrometer.core.instrument.MeterRegistry registry, String prefix, String... tags) MicrometerMetricsCollector(Function<MicrometerMetricsCollector.Metrics, Object> metricsCreator) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddecrementChannelCount(Channel channel) Decrements channel count.protected voiddecrementConnectionCount(Connection connection) Decrements connection count.io.micrometer.core.instrument.Counterio.micrometer.core.instrument.Counterio.micrometer.core.instrument.Counterio.micrometer.core.instrument.Counterio.micrometer.core.instrument.Counterio.micrometer.core.instrument.Counterio.micrometer.core.instrument.Counterio.micrometer.core.instrument.Counterio.micrometer.core.instrument.Counterprotected voidincrementChannelCount(Channel channel) Increments channel count.protected voidincrementConnectionCount(Connection connection) Increments connection count.protected voidMarks the event of an acknowledged message.protected voidMarks the event of a consumed message.protected voidMarks the event of a message publishing acknowledgement.protected voidMarks the event of a message publishing failure.protected voidMarks the event of a message publishing not being acknowledged.protected voidMarks the event of a published message.protected voidMarks the event of a published message not being routed.protected voidMarks the event of a rejected message.protected voidmarkRejectedMessage(boolean requeue) Marks the event of a rejected message.Methods inherited from class com.rabbitmq.client.impl.AbstractMetricsCollector
basicAck, basicCancel, basicConsume, basicNack, basicNack, basicPublish, basicPublishAck, basicPublishFailure, basicPublishNack, basicPublishUnrouted, basicReject, basicReject, cleanStaleState, closeChannel, closeConnection, consumedMessage, consumedMessage, newChannel, newConnection
-
Constructor Details
-
MicrometerMetricsCollector
public MicrometerMetricsCollector(io.micrometer.core.instrument.MeterRegistry registry) -
MicrometerMetricsCollector
public MicrometerMetricsCollector(io.micrometer.core.instrument.MeterRegistry registry, String prefix) -
MicrometerMetricsCollector
-
MicrometerMetricsCollector
-
MicrometerMetricsCollector
public MicrometerMetricsCollector(Function<MicrometerMetricsCollector.Metrics, Object> metricsCreator)
-
-
Method Details
-
incrementConnectionCount
Description copied from class:AbstractMetricsCollectorIncrements connection count. The connection object is passed in as complementary information and without any guarantee of not being null.- Specified by:
incrementConnectionCountin classAbstractMetricsCollector- Parameters:
connection- the connection that has been created (can be null)
-
decrementConnectionCount
Description copied from class:AbstractMetricsCollectorDecrements connection count. The connection object is passed in as complementary information and without any guarantee of not being null.- Specified by:
decrementConnectionCountin classAbstractMetricsCollector- Parameters:
connection- the connection that has been closed (can be null)
-
incrementChannelCount
Description copied from class:AbstractMetricsCollectorIncrements channel count. The channel object is passed in as complementary information and without any guarantee of not being null.- Specified by:
incrementChannelCountin classAbstractMetricsCollector- Parameters:
channel- the channel that has been created (can be null)
-
decrementChannelCount
Description copied from class:AbstractMetricsCollectorDecrements channel count. The channel object is passed in as complementary information and without any guarantee of not being null.- Specified by:
decrementChannelCountin classAbstractMetricsCollector- Parameters:
channel-
-
markPublishedMessage
protected void markPublishedMessage()Description copied from class:AbstractMetricsCollectorMarks the event of a published message.- Specified by:
markPublishedMessagein classAbstractMetricsCollector
-
markMessagePublishFailed
protected void markMessagePublishFailed()Description copied from class:AbstractMetricsCollectorMarks the event of a message publishing failure.- Specified by:
markMessagePublishFailedin classAbstractMetricsCollector
-
markConsumedMessage
protected void markConsumedMessage()Description copied from class:AbstractMetricsCollectorMarks the event of a consumed message.- Specified by:
markConsumedMessagein classAbstractMetricsCollector
-
markAcknowledgedMessage
protected void markAcknowledgedMessage()Description copied from class:AbstractMetricsCollectorMarks the event of an acknowledged message.- Specified by:
markAcknowledgedMessagein classAbstractMetricsCollector
-
markRejectedMessage
protected void markRejectedMessage()Description copied from class:AbstractMetricsCollectorMarks the event of a rejected message.- Specified by:
markRejectedMessagein classAbstractMetricsCollector
-
markRejectedMessage
protected void markRejectedMessage(boolean requeue) Description copied from class:AbstractMetricsCollectorMarks the event of a rejected message.- Overrides:
markRejectedMessagein classAbstractMetricsCollector
-
markMessagePublishAcknowledged
protected void markMessagePublishAcknowledged()Description copied from class:AbstractMetricsCollectorMarks the event of a message publishing acknowledgement.- Specified by:
markMessagePublishAcknowledgedin classAbstractMetricsCollector
-
markMessagePublishNotAcknowledged
protected void markMessagePublishNotAcknowledged()Description copied from class:AbstractMetricsCollectorMarks the event of a message publishing not being acknowledged.- Specified by:
markMessagePublishNotAcknowledgedin classAbstractMetricsCollector
-
markPublishedMessageUnrouted
protected void markPublishedMessageUnrouted()Description copied from class:AbstractMetricsCollectorMarks the event of a published message not being routed.- Specified by:
markPublishedMessageUnroutedin classAbstractMetricsCollector
-
getConnections
-
getChannels
-
getPublishedMessages
public io.micrometer.core.instrument.Counter getPublishedMessages() -
getFailedToPublishMessages
public io.micrometer.core.instrument.Counter getFailedToPublishMessages() -
getAckedPublishedMessages
public io.micrometer.core.instrument.Counter getAckedPublishedMessages() -
getNackedPublishedMessages
public io.micrometer.core.instrument.Counter getNackedPublishedMessages() -
getUnroutedPublishedMessages
public io.micrometer.core.instrument.Counter getUnroutedPublishedMessages() -
getConsumedMessages
public io.micrometer.core.instrument.Counter getConsumedMessages() -
getAcknowledgedMessages
public io.micrometer.core.instrument.Counter getAcknowledgedMessages() -
getRejectedMessages
public io.micrometer.core.instrument.Counter getRejectedMessages() -
getRequeuedMessages
public io.micrometer.core.instrument.Counter getRequeuedMessages()
-