AutoCloseable () { final Meter meter = TelemetryManager.getInstance().getMeter(VFS); var queriesCounter = meter.counterBuilder("FileNameCache.queries").buildObserver(); var fastMissesCounter = meter.counterBuilder("FileNameCache.fastMisses").buildObserver(); var totalMissesCounter = meter.counterBuilder("FileNameCache.totalMisses").buildObserver(); return meter.batchCallback(() -> { queriesCounter.record(requestsCount.longValue()); fastMissesCounter.record(fastCacheMissesCount.longValue()); totalMissesCounter.record(totalCacheMissesCount.longValue()); }, queriesCounter, fastMissesCounter, totalMissesCounter); }