cshannon commented on code in PR #4771:
URL: https://github.com/apache/accumulo/pull/4771#discussion_r1694002464


##########
test/src/main/java/org/apache/accumulo/test/metrics/MetricsIT.java:
##########
@@ -287,4 +287,28 @@ public void metricTags() throws Exception {
           });
     }
   }
+
+  @Test
+  public void fateMetrics() throws Exception {
+    doWorkToGenerateMetrics();
+    cluster.stop();
+
+    List<String> statsDMetrics;
+
+    while (!(statsDMetrics = sink.getLines()).isEmpty()) {
+      statsDMetrics.stream().filter(line -> 
line.startsWith("accumulo.fate.tx"))
+          .map(TestStatsDSink::parseStatsDMetric).forEach(a -> {
+            var t = a.getTags();
+            log.debug("METRICS, received from statsd - name: '{}' num tags: 
{}, tags: {} = {}",
+                a.getName(), t.size(), t, a.getValue());
+
+            // Verify the fate metrics contain state and instanceType
+            // Checking the value would be hard to test because the metrics 
are updated on a timer
+            // and fate transactions get cleaned up when finished so the 
current state is a bit
+            // non-deterministic
+            assertNotNull(a.getTags().get("state"));
+            assertNotNull(a.getTags().get("instanceType"));

Review Comment:
   Yeah I can add that for sure



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to