Skip to content

Commit 2c85c38

Browse files
committed
Spotless fix
1 parent c9eb0a7 commit 2c85c38

File tree

2 files changed

+85
-81
lines changed

2 files changed

+85
-81
lines changed

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/target_systems/ActiveMqIntegrationTest.java

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -40,83 +40,83 @@ protected JmxScraperContainer customizeScraperContainer(
4040
protected MetricsVerifier createMetricsVerifier() {
4141
return MetricsVerifier.create()
4242
.assertUpDownCounterWithAttributes(
43-
"activemq.consumer.count",
44-
"The number of consumers currently reading from the broker.",
45-
"{consumer}",
46-
attrs ->
47-
attrs.containsOnly(
48-
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
49-
entry("broker", "localhost")))
50-
.assertUpDownCounterWithAttributes(
51-
"activemq.producer.count",
52-
"The number of producers currently attached to the broker.",
53-
"{producer}",
54-
attrs ->
55-
attrs.containsOnly(
56-
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
57-
entry("broker", "localhost")))
58-
.assertUpDownCounterWithAttributes(
59-
"activemq.connection.count",
60-
"The total number of current connections.",
61-
"{connection}",
62-
attrs -> attrs.containsOnly(entry("broker", "localhost")))
63-
.assertGaugeWithAttributes(
64-
"activemq.memory.usage",
65-
"The percentage of configured memory used.",
66-
"%",
67-
attrs ->
68-
attrs.containsOnly(
69-
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
70-
entry("broker", "localhost")))
71-
.assertGaugeWithAttributes(
72-
"activemq.disk.store_usage",
73-
"The percentage of configured disk used for persistent messages.",
74-
"%",
75-
attrs -> attrs.containsOnly(entry("broker", "localhost")))
76-
.assertGaugeWithAttributes(
77-
"activemq.disk.temp_usage",
78-
"The percentage of configured disk used for non-persistent messages.",
79-
"%",
80-
attrs -> attrs.containsOnly(entry("broker", "localhost")))
81-
.assertUpDownCounterWithAttributes(
82-
"activemq.message.current",
83-
"The current number of messages waiting to be consumed.",
84-
"{message}",
85-
attrs ->
86-
attrs.containsOnly(
87-
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
88-
entry("broker", "localhost")))
89-
.assertCounterWithAttributes(
90-
"activemq.message.expired",
91-
"The total number of messages not delivered because they expired.",
92-
"{message}",
93-
attrs ->
94-
attrs.containsOnly(
95-
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
96-
entry("broker", "localhost")))
97-
.assertCounterWithAttributes(
98-
"activemq.message.enqueued",
99-
"The total number of messages received by the broker.",
100-
"{message}",
101-
attrs ->
102-
attrs.containsOnly(
103-
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
104-
entry("broker", "localhost")))
105-
.assertCounterWithAttributes(
106-
"activemq.message.dequeued",
107-
"The total number of messages delivered to consumers.",
108-
"{message}",
109-
attrs ->
110-
attrs.containsOnly(
111-
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
112-
entry("broker", "localhost")))
113-
.assertGaugeWithAttributes(
114-
"activemq.message.wait_time.avg",
115-
"The average time a message was held on a destination.",
116-
"ms",
117-
attrs ->
118-
attrs.containsOnly(
119-
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
120-
entry("broker", "localhost")));
43+
"activemq.consumer.count",
44+
"The number of consumers currently reading from the broker.",
45+
"{consumer}",
46+
attrs ->
47+
attrs.containsOnly(
48+
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
49+
entry("broker", "localhost")))
50+
.assertUpDownCounterWithAttributes(
51+
"activemq.producer.count",
52+
"The number of producers currently attached to the broker.",
53+
"{producer}",
54+
attrs ->
55+
attrs.containsOnly(
56+
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
57+
entry("broker", "localhost")))
58+
.assertUpDownCounterWithAttributes(
59+
"activemq.connection.count",
60+
"The total number of current connections.",
61+
"{connection}",
62+
attrs -> attrs.containsOnly(entry("broker", "localhost")))
63+
.assertGaugeWithAttributes(
64+
"activemq.memory.usage",
65+
"The percentage of configured memory used.",
66+
"%",
67+
attrs ->
68+
attrs.containsOnly(
69+
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
70+
entry("broker", "localhost")))
71+
.assertGaugeWithAttributes(
72+
"activemq.disk.store_usage",
73+
"The percentage of configured disk used for persistent messages.",
74+
"%",
75+
attrs -> attrs.containsOnly(entry("broker", "localhost")))
76+
.assertGaugeWithAttributes(
77+
"activemq.disk.temp_usage",
78+
"The percentage of configured disk used for non-persistent messages.",
79+
"%",
80+
attrs -> attrs.containsOnly(entry("broker", "localhost")))
81+
.assertUpDownCounterWithAttributes(
82+
"activemq.message.current",
83+
"The current number of messages waiting to be consumed.",
84+
"{message}",
85+
attrs ->
86+
attrs.containsOnly(
87+
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
88+
entry("broker", "localhost")))
89+
.assertCounterWithAttributes(
90+
"activemq.message.expired",
91+
"The total number of messages not delivered because they expired.",
92+
"{message}",
93+
attrs ->
94+
attrs.containsOnly(
95+
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
96+
entry("broker", "localhost")))
97+
.assertCounterWithAttributes(
98+
"activemq.message.enqueued",
99+
"The total number of messages received by the broker.",
100+
"{message}",
101+
attrs ->
102+
attrs.containsOnly(
103+
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
104+
entry("broker", "localhost")))
105+
.assertCounterWithAttributes(
106+
"activemq.message.dequeued",
107+
"The total number of messages delivered to consumers.",
108+
"{message}",
109+
attrs ->
110+
attrs.containsOnly(
111+
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
112+
entry("broker", "localhost")))
113+
.assertGaugeWithAttributes(
114+
"activemq.message.wait_time.avg",
115+
"The average time a message was held on a destination.",
116+
"ms",
117+
attrs ->
118+
attrs.containsOnly(
119+
entry("destination", "ActiveMQ.Advisory.MasterBroker"),
120+
entry("broker", "localhost")));
121121
}
122122
}

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/target_systems/MetricsVerifier.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,19 @@ public MetricsVerifier assertUpDownCounter(String metricName, String description
7676

7777
@SafeVarargs
7878
@SuppressWarnings("CanIgnoreReturnValueSuggester")
79-
public final MetricsVerifier assertGaugeWithAttributes(String metricName, String description,
80-
String unit, Consumer<MapAssert<String, String>>... attributeGroupAssertions) {
79+
public final MetricsVerifier assertGaugeWithAttributes(
80+
String metricName,
81+
String description,
82+
String unit,
83+
Consumer<MapAssert<String, String>>... attributeGroupAssertions) {
8184
assertions.put(
8285
metricName,
8386
metric -> {
8487
assertDescription(metric, description);
8588
assertUnit(metric, unit);
8689
assertMetricWithGauge(metric);
87-
assertAttributedPoints(metricName, metric.getGauge().getDataPointsList(), attributeGroupAssertions);
90+
assertAttributedPoints(
91+
metricName, metric.getGauge().getDataPointsList(), attributeGroupAssertions);
8892
});
8993

9094
return this;

0 commit comments

Comments
 (0)