refactor session safety metrics into auxiliary component

This commit is contained in:
Jonathan Shook
2023-12-22 13:36:58 -06:00
parent 20f7d05c9a
commit ed0315f367

View File

@@ -64,7 +64,16 @@ public class NBSession extends NBBaseComponent implements Function<List<Cmd>, Ex
labelContext.getLabels()
.and("session", sessionName)
);
new NBSessionSafetyMetrics(this);
create().gauge(
"session_time",
() -> (double)System.nanoTime(),
MetricCategory.Core,
"session time in nanoseconds"
);
bufferOrphanedMetrics = true;
}