Closed DomGarguilo closed 1 month ago
Added logging to this code and it turns out that it is not creating more meters each time.
log.info("Current meter count after update: {}", registry.getMeters().size());
results in:
2024-10-03T13:01:44,307 [fate.FateMetrics] INFO : Current meter count after update: 17
2024-10-03T13:02:44,306 [fate.FateMetrics] INFO : Current meter count after update: 17
2024-10-03T13:03:44,307 [fate.FateMetrics] INFO : Current meter count after update: 17
2024-10-03T13:04:44,305 [fate.FateMetrics] INFO : Current meter count after update: 17
2024-10-03T13:05:44,306 [fate.FateMetrics] INFO : Current meter count after update: 17
Which shows that this metric update code is being called once every minute (not each second like I thought before) and the number of meters is not increasing.
https://github.com/apache/accumulo/blob/88bd23ea5afd424242e95ff3963f0d898368bd5e/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetrics.java#L114-L115 I haven't looked into things too much but it seems like this code would create a new micrometer Gauge each time it is called (which ends up being once every second).
Originally posted by @DomGarguilo in https://github.com/apache/accumulo/issues/4924#issuecomment-2372329360