Skip to content

Commit 191958f

Browse files
committed
fix: Custom PerformanceEntry accessors are deprecated. Please use the detail property.
1 parent f7d0a8b commit 191958f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

metrics/gc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = (meter, {prefix, labels, gcDurationBuckets}) => {
2121
const obs = new PerformanceObserver(list => {
2222
const entry = list.getEntries()[0]
2323
// Convert duration from milliseconds to seconds
24-
kinds[entry.kind].record(entry.duration / 1000)
24+
kinds[entry.detail ? entry.detail.kind : entry.kind].record(entry.duration / 1000)
2525
})
2626

2727
// We do not expect too many gc events per second, so we do not use buffering

0 commit comments

Comments
 (0)