Tracer Version(s)
5.82.0
Node.js Version(s)
20.x
Bug Report
The pg instrumentation triggers a deprecation warning with pg v8.17+:
(node:1) DeprecationWarning: Client.activeQuery is deprecated and will be removed in a future version.
pg v8.17.0+ deprecated activeQuery in PR #3510. The property is now a getter that emits a warning and proxies to the internal _activeQuery:
// from packages/pg/lib/client.js
const activeQueryDeprecationNotice = nodeUtils.deprecate(
() => {},
'Client.activeQuery is deprecated and will be removed in a future version.'
)
get activeQuery() {
activeQueryDeprecationNotice()
return this._activeQuery
}
Seems like the current code evaluates this.activeQuery first which triggers the getter that emits the deprecation warning:
|
const queryQueue = this.queryQueue || this._queryQueue |
|
const activeQuery = this.activeQuery || this._activeQuery |
The same applies to queryQueue
Reproduction Code
No response
Error Logs
No response
Tracer Config
No response
Operating System
No response
Bundling
ESBuild
Tracer Version(s)
5.82.0
Node.js Version(s)
20.x
Bug Report
The
pginstrumentation triggers a deprecation warning withpg v8.17+:(node:1) DeprecationWarning: Client.activeQuery is deprecated and will be removed in a future version.pg v8.17.0+ deprecated
activeQueryin PR #3510. The property is now a getter that emits a warning and proxies to the internal_activeQuery:Seems like the current code evaluates
this.activeQueryfirst which triggers the getter that emits the deprecation warning:dd-trace-js/packages/datadog-instrumentations/src/pg.js
Lines 115 to 116 in 39c85a4
The same applies to
queryQueueReproduction Code
No response
Error Logs
No response
Tracer Config
No response
Operating System
No response
Bundling
ESBuild