JMX Scraper - Invalid ActiveMQ units fixed (#1553)

This commit is contained in:
Robert Niedziela 2024-11-19 21:24:35 +01:00 committed by GitHub
parent 41a07af284
commit 857e4ae8c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 30 additions and 30 deletions

View File

@ -43,7 +43,7 @@ class ActivemqIntegrationTest extends AbstractIntegrationTest {
metric,
"activemq.consumer.count",
"The number of consumers currently reading from the broker.",
"consumers",
"{consumer}",
attrs ->
attrs.containsOnly(
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
@ -53,7 +53,7 @@ class ActivemqIntegrationTest extends AbstractIntegrationTest {
metric,
"activemq.producer.count",
"The number of producers currently attached to the broker.",
"producers",
"{producer}",
attrs ->
attrs.containsOnly(
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
@ -63,7 +63,7 @@ class ActivemqIntegrationTest extends AbstractIntegrationTest {
metric,
"activemq.connection.count",
"The total number of current connections.",
"connections",
"{connection}",
/* isMonotonic= */ false),
metric ->
assertGaugeWithAttributes(
@ -92,7 +92,7 @@ class ActivemqIntegrationTest extends AbstractIntegrationTest {
metric,
"activemq.message.current",
"The current number of messages waiting to be consumed.",
"messages",
"{message}",
attrs ->
attrs.containsOnly(
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
@ -102,7 +102,7 @@ class ActivemqIntegrationTest extends AbstractIntegrationTest {
metric,
"activemq.message.current",
"The current number of messages waiting to be consumed.",
"messages",
"{message}",
attrs ->
attrs.containsOnly(
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
@ -112,7 +112,7 @@ class ActivemqIntegrationTest extends AbstractIntegrationTest {
metric,
"activemq.message.expired",
"The total number of messages not delivered because they expired.",
"messages",
"{message}",
attrs ->
attrs.containsOnly(
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
@ -122,7 +122,7 @@ class ActivemqIntegrationTest extends AbstractIntegrationTest {
metric,
"activemq.message.enqueued",
"The total number of messages received by the broker.",
"messages",
"{message}",
attrs ->
attrs.containsOnly(
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
@ -132,7 +132,7 @@ class ActivemqIntegrationTest extends AbstractIntegrationTest {
metric,
"activemq.message.dequeued",
"The total number of messages delivered to consumers.",
"messages",
"{message}",
attrs ->
attrs.containsOnly(
entry("destination", "ActiveMQ.Advisory.MasterBroker"),

View File

@ -26,7 +26,7 @@ def activemqMetrics = otel.mbeans(
otel.instrument(activemqMetrics,
"activemq.producer.count",
"The number of producers currently attached to the broker.",
"producers",
"{producer}",
["destination" : { mbean -> mbean.name().getKeyProperty("destinationName")},
"broker" : { mbean -> mbean.name().getKeyProperty("brokerName")}],
"ProducerCount",
@ -35,7 +35,7 @@ otel.instrument(activemqMetrics,
otel.instrument(activemqMetrics,
"activemq.consumer.count",
"The number of consumers currently reading from the broker.",
"consumers",
"{consumer}",
["destination" : { mbean -> mbean.name().getKeyProperty("destinationName") },
"broker" : { mbean -> mbean.name().getKeyProperty("brokerName")}],
"ConsumerCount",
@ -53,7 +53,7 @@ otel.instrument(activemqMetrics,
otel.instrument(activemqMetrics,
"activemq.message.current",
"The current number of messages waiting to be consumed.",
"messages",
"{message}",
["destination" : { mbean -> mbean.name().getKeyProperty("destinationName") },
"broker" : { mbean -> mbean.name().getKeyProperty("brokerName")}],
"QueueSize",
@ -62,7 +62,7 @@ otel.instrument(activemqMetrics,
otel.instrument(activemqMetrics,
"activemq.message.expired",
"The total number of messages not delivered because they expired.",
"messages",
"{message}",
["destination" : { mbean -> mbean.name().getKeyProperty("destinationName") },
"broker" : { mbean -> mbean.name().getKeyProperty("brokerName")}],
"ExpiredCount",
@ -71,7 +71,7 @@ otel.instrument(activemqMetrics,
otel.instrument(activemqMetrics,
"activemq.message.enqueued",
"The total number of messages received by the broker.",
"messages",
"{message}",
["destination" : { mbean -> mbean.name().getKeyProperty("destinationName") },
"broker" : { mbean -> mbean.name().getKeyProperty("brokerName")}],
"EnqueueCount",
@ -80,7 +80,7 @@ otel.instrument(activemqMetrics,
otel.instrument(activemqMetrics,
"activemq.message.dequeued",
"The total number of messages delivered to consumers.",
"messages",
"{message}",
["destination" : { mbean -> mbean.name().getKeyProperty("destinationName") },
"broker" : { mbean -> mbean.name().getKeyProperty("brokerName")}],
"DequeueCount",
@ -105,7 +105,7 @@ def activemqMetricsNoDestination = otel.mbean(
otel.instrument(activemqMetricsNoDestination,
"activemq.connection.count",
"The total number of current connections.",
"connections",
"{connection}",
"CurrentConnectionsCount",
otel.&longUpDownCounterCallback)
@ -121,4 +121,4 @@ otel.instrument(activemqMetricsNoDestination,
"The percentage of configured disk used for non-persistent messages.",
"%",
"TempPercentUsage",
otel.&doubleValueCallback)
otel.&doubleValueCallback)

View File

@ -46,7 +46,7 @@ public class ActiveMqIntegrationTest extends TargetSystemIntegrationTest {
metric,
"activemq.consumer.count",
"The number of consumers currently reading from the broker.",
"consumers",
"{consumer}",
/* isMonotonic= */ false,
attrs ->
attrs.containsOnly(
@ -57,7 +57,7 @@ public class ActiveMqIntegrationTest extends TargetSystemIntegrationTest {
metric,
"activemq.producer.count",
"The number of producers currently attached to the broker.",
"producers",
"{producer}",
/* isMonotonic= */ false,
attrs ->
attrs.containsOnly(
@ -68,7 +68,7 @@ public class ActiveMqIntegrationTest extends TargetSystemIntegrationTest {
metric,
"activemq.connection.count",
"The total number of current connections.",
"connections",
"{connection}",
/* isMonotonic= */ false,
attrs -> attrs.containsOnly(entry("broker", "localhost"))),
metric ->
@ -100,7 +100,7 @@ public class ActiveMqIntegrationTest extends TargetSystemIntegrationTest {
metric,
"activemq.message.current",
"The current number of messages waiting to be consumed.",
"messages",
"{message}",
/* isMonotonic= */ false,
attrs ->
attrs.containsOnly(
@ -111,7 +111,7 @@ public class ActiveMqIntegrationTest extends TargetSystemIntegrationTest {
metric,
"activemq.message.expired",
"The total number of messages not delivered because they expired.",
"messages",
"{message}",
attrs ->
attrs.containsOnly(
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
@ -121,7 +121,7 @@ public class ActiveMqIntegrationTest extends TargetSystemIntegrationTest {
metric,
"activemq.message.enqueued",
"The total number of messages received by the broker.",
"messages",
"{message}",
attrs ->
attrs.containsOnly(
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
@ -131,7 +131,7 @@ public class ActiveMqIntegrationTest extends TargetSystemIntegrationTest {
metric,
"activemq.message.dequeued",
"The total number of messages delivered to consumers.",
"messages",
"{message}",
attrs ->
attrs.containsOnly(
entry("destination", "ActiveMQ.Advisory.MasterBroker"),

View File

@ -12,14 +12,14 @@ rules:
metric: producer.count
# Unit name inherited from activemq.groovy file.
# Will be updated to {} semconv notation when we switch to use original files from JMX Insights
unit: "producers"
unit: "{producer}"
type: updowncounter
desc: The number of producers currently attached to the broker.
ConsumerCount:
metric: consumer.count
# Unit name inherited from activemq.groovy file.
# Will be updated to {} semconv notation when we switch to use original files from JMX Insights
unit: "consumers"
unit: "{consumer}"
type: updowncounter
desc: The number of consumers currently reading from the broker.
MemoryPercentUsage:
@ -31,28 +31,28 @@ rules:
metric: message.current
# Unit name inherited from activemq.groovy file.
# Will be updated to {} semconv notation when we switch to use original files from JMX Insights
unit: "messages"
unit: "{message}"
type: updowncounter
desc: The current number of messages waiting to be consumed.
ExpiredCount:
metric: message.expired
# Unit name inherited from activemq.groovy file.
# Will be updated to {} semconv notation when we switch to use original files from JMX Insights
unit: "messages"
unit: "{message}"
type: counter
desc: The total number of messages not delivered because they expired.
EnqueueCount:
metric: message.enqueued
# Unit name inherited from activemq.groovy file.
# Will be updated to {} semconv notation when we switch to use original files from JMX Insights
unit: "messages"
unit: "{message}"
type: counter
desc: The total number of messages received by the broker.
DequeueCount:
metric: message.dequeued
# Unit name inherited from activemq.groovy file.
# Will be updated to {} semconv notation when we switch to use original files from JMX Insights
unit: "messages"
unit: "{message}"
type: counter
desc: The total number of messages delivered to consumers.
AverageEnqueueTime:
@ -75,7 +75,7 @@ rules:
type: updowncounter
# Unit name inherited from activemq.groovy file.
# Will be updated to {} semconv notation when we switch to use original files from JMX Insights
unit: "connections"
unit: "{connection}"
desc: The total number of current connections.
StorePercentUsage:
metric: disk.store_usage