From 191958fec1330dabe9c8c2fa5c56570c7ee57057 Mon Sep 17 00:00:00 2001 From: Marc Bachmann Date: Sun, 12 Sep 2021 15:53:42 +0200 Subject: [PATCH] fix: Custom PerformanceEntry accessors are deprecated. Please use the detail property. --- metrics/gc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics/gc.js b/metrics/gc.js index 3a3d645..b20f662 100644 --- a/metrics/gc.js +++ b/metrics/gc.js @@ -21,7 +21,7 @@ module.exports = (meter, {prefix, labels, gcDurationBuckets}) => { const obs = new PerformanceObserver(list => { const entry = list.getEntries()[0] // Convert duration from milliseconds to seconds - kinds[entry.kind].record(entry.duration / 1000) + kinds[entry.detail ? entry.detail.kind : entry.kind].record(entry.duration / 1000) }) // We do not expect too many gc events per second, so we do not use buffering