public class MicrometerMetricsCollector extends AbstractMetricsCollector
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
.MetricsCollector
Modifier and Type | Class and Description |
---|---|
static class |
MicrometerMetricsCollector.Metrics |
Constructor and Description |
---|
MicrometerMetricsCollector(Function<MicrometerMetricsCollector.Metrics,Object> metricsCreator) |
MicrometerMetricsCollector(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) |
Modifier and Type | Method and Description |
---|---|
protected void |
decrementChannelCount(Channel channel)
Decrements channel count.
|
protected void |
decrementConnectionCount(Connection connection)
Decrements connection count.
|
io.micrometer.core.instrument.Counter |
getAckedPublishedMessages() |
io.micrometer.core.instrument.Counter |
getAcknowledgedMessages() |
AtomicLong |
getChannels() |
AtomicLong |
getConnections() |
io.micrometer.core.instrument.Counter |
getConsumedMessages() |
io.micrometer.core.instrument.Counter |
getFailedToPublishMessages() |
io.micrometer.core.instrument.Counter |
getNackedPublishedMessages() |
io.micrometer.core.instrument.Counter |
getPublishedMessages() |
io.micrometer.core.instrument.Counter |
getRejectedMessages() |
io.micrometer.core.instrument.Counter |
getUnroutedPublishedMessages() |
protected void |
incrementChannelCount(Channel channel)
Increments channel count.
|
protected void |
incrementConnectionCount(Connection connection)
Increments connection count.
|
protected void |
markAcknowledgedMessage()
Marks the event of an acknowledged message.
|
protected void |
markConsumedMessage()
Marks the event of a consumed message.
|
protected void |
markMessagePublishAcknowledged()
Marks the event of a message publishing acknowledgement.
|
protected void |
markMessagePublishFailed()
Marks the event of a message publishing failure.
|
protected void |
markMessagePublishNotAcknowledged()
Marks the event of a message publishing not being acknowledged.
|
protected void |
markPublishedMessage()
Marks the event of a published message.
|
protected void |
markPublishedMessageUnrouted()
Marks the event of a published message not being routed.
|
protected void |
markRejectedMessage()
Marks the event of a rejected message.
|
basicAck, basicCancel, basicConsume, basicNack, basicPublish, basicPublishAck, basicPublishFailure, basicPublishNack, basicPublishUnrouted, basicReject, cleanStaleState, closeChannel, closeConnection, consumedMessage, consumedMessage, newChannel, newConnection
public MicrometerMetricsCollector(io.micrometer.core.instrument.MeterRegistry registry)
public MicrometerMetricsCollector(io.micrometer.core.instrument.MeterRegistry registry, String prefix)
public MicrometerMetricsCollector(io.micrometer.core.instrument.MeterRegistry registry, String prefix, String... tags)
public MicrometerMetricsCollector(io.micrometer.core.instrument.MeterRegistry registry, String prefix, Iterable<io.micrometer.core.instrument.Tag> tags)
public MicrometerMetricsCollector(Function<MicrometerMetricsCollector.Metrics,Object> metricsCreator)
protected void incrementConnectionCount(Connection connection)
AbstractMetricsCollector
incrementConnectionCount
in class AbstractMetricsCollector
connection
- the connection that has been created (can be null)protected void decrementConnectionCount(Connection connection)
AbstractMetricsCollector
decrementConnectionCount
in class AbstractMetricsCollector
connection
- the connection that has been closed (can be null)protected void incrementChannelCount(Channel channel)
AbstractMetricsCollector
incrementChannelCount
in class AbstractMetricsCollector
channel
- the channel that has been created (can be null)protected void decrementChannelCount(Channel channel)
AbstractMetricsCollector
decrementChannelCount
in class AbstractMetricsCollector
protected void markPublishedMessage()
AbstractMetricsCollector
markPublishedMessage
in class AbstractMetricsCollector
protected void markMessagePublishFailed()
AbstractMetricsCollector
markMessagePublishFailed
in class AbstractMetricsCollector
protected void markConsumedMessage()
AbstractMetricsCollector
markConsumedMessage
in class AbstractMetricsCollector
protected void markAcknowledgedMessage()
AbstractMetricsCollector
markAcknowledgedMessage
in class AbstractMetricsCollector
protected void markRejectedMessage()
AbstractMetricsCollector
markRejectedMessage
in class AbstractMetricsCollector
protected void markMessagePublishAcknowledged()
AbstractMetricsCollector
markMessagePublishAcknowledged
in class AbstractMetricsCollector
protected void markMessagePublishNotAcknowledged()
AbstractMetricsCollector
markMessagePublishNotAcknowledged
in class AbstractMetricsCollector
protected void markPublishedMessageUnrouted()
AbstractMetricsCollector
markPublishedMessageUnrouted
in class AbstractMetricsCollector
public AtomicLong getConnections()
public AtomicLong getChannels()
public io.micrometer.core.instrument.Counter getPublishedMessages()
public io.micrometer.core.instrument.Counter getFailedToPublishMessages()
public io.micrometer.core.instrument.Counter getAckedPublishedMessages()
public io.micrometer.core.instrument.Counter getNackedPublishedMessages()
public io.micrometer.core.instrument.Counter getUnroutedPublishedMessages()
public io.micrometer.core.instrument.Counter getConsumedMessages()
public io.micrometer.core.instrument.Counter getAcknowledgedMessages()
public io.micrometer.core.instrument.Counter getRejectedMessages()
Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.