You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "accessor" that is referred to in the DeprecationWarning most likely refers to entry.kind on that line.
According to the doc update hereperformanceEntry.kind was deprecated in favor of using the detail property.
Reacted by Simen Bekkhus, Milan B and Rocco Di Leo
or if someone is a fan of long lines, then just the Object.assign(observations, labels), to Object.assign({kind: kinds[entry.detail && entry.detail.kind || entry.kind]}, labels),.
Alternatively, some if (parseInt(process.versions.node) >= 16) { ... use entry.detail.kind } else { old code }.
That said, I got it to work, but I didn't get the unit tests to succeed under Node.js v16.0.0 because of what I assume is a Node.js bug.
We have also started to see these deprecation warnings.
Since #440 looks good, but is over two month old I am guessing it might have just been forgotten about and just needs a friendly nudge to get moving again?
Activity
SimenB commentedon Apr 22, 2021
The reported line looks innocent to me: https://github.com/siimon/prom-client/blob/96f7495d66b1a21755f745b1367d3e530668a957/lib/metrics/gc.js#L47
Not sure what's up. Maybe the detection in node is thrown off by the merging?
/cc @sam-github if you know
oskarolsson-jimdo commentedon Apr 22, 2021
The "accessor" that is referred to in the DeprecationWarning most likely refers to
entry.kindon that line.According to the doc update here
performanceEntry.kindwas deprecated in favor of using thedetailproperty.SimenB commentedon Apr 22, 2021
Aha! I didn't think
kindwas "custom" 🙂 Wanna send a PR fixing it? We need to make sure we still work on node 10, not sure how backporteddetailis?analytik commentedon Apr 26, 2021
The
detailshould be a new property in 16.0.0, although the documentation confusingly refers to it asdetails.The quickest, dirtiest, but probably working "patch" is to change gc.js to something like
or if someone is a fan of long lines, then just the
Object.assign(observations, labels),toObject.assign({kind: kinds[entry.detail && entry.detail.kind || entry.kind]}, labels),.Alternatively, some
if (parseInt(process.versions.node) >= 16) { ... use entry.detail.kind } else { old code }.That said, I got it to work, but I didn't get the unit tests to succeed under Node.js v16.0.0 because of what I assume is a Node.js bug.
SimenB commentedon Apr 26, 2021
Checking the object rather than node version makes sense to me 👍 They might backport it, and it'd be good to use it at that point
sirreal commentedon May 12, 2021
I've proposed a fix in #440 building off the research and discussion provided in this thread.
nlochschmidt commentedon Jul 27, 2021
We have also started to see these deprecation warnings.
Since #440 looks good, but is over two month old I am guessing it might have just been forgotten about and just needs a friendly nudge to get moving again?