jbertram commented on a change in pull request #2681: ARTEMIS-2308 Support
exporting metrics
URL: https://github.com/apache/activemq-artemis/pull/2681#discussion_r287859981
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
##########
@@ -3852,6 +3859,41 @@ void scheduleSlowConsumerReaper(AddressSettings
settings) {
}
}
+ private void registerMeters() {
+ String addressName = address.toString();
+ String queueName = name.toString();
+
+ if (server != null && server.getMetricsManager() != null) {
+ MetricsManager metricsManager = server.getMetricsManager();
+ metricsManager.registerQueueGauge("message.count", addressName,
queueName, pendingMetrics, metrics ->
Double.valueOf(pendingMetrics.getMessageCount()),
QueueControl.MESSAGE_COUNT_DESCRIPTION);
Review comment:
I'm not entirely sure what you mean. Do you mean declaring something like:
`static final String MESSAGE_COUNT = "message.count";`
And then using `MESSAGE_COUNT` in the method invocation?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services