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
I recently migrated from dd-trace 4.29 to 4.49
I'm using node 22.11.0.
This code:
const ddtrace = require('dd-trace');
const dns = require("node:dns");
const tracer = ddtrace.init({
serviceName: 'my-service',
lookup: (...args) => {
console.log('LOOKUP CALLED');
return dns.lookup(...args)
},
hostname: 'whaafldjslkfds.com',
});
function main() {
tracer.trace('trace', () => {
console.log(`TRACED`);
}
);
setTimeout(() => {
console.log('Time to send the request to the agent')
}, 2000)
}
main();
Is working and displaying LOOKUP CALLED in 4.29.0, but is throwing TypeError [ERR_INVALID_ARG_TYPE]: The "options.lookup" property must be of type function. Received type string ('(...args) => {
In 4.49.0
If I should guess the culprit, I'd say this line: lookup is not a string, it's a function.
Edit:
confirming that replacing the above line by this._setValue(opts, 'lookup', options.lookup) solves the problem
The text was updated successfully, but these errors were encountered:
I recently migrated from dd-trace 4.29 to 4.49
I'm using node 22.11.0.
This code:
Is working and displaying
LOOKUP CALLED
in 4.29.0, but is throwingTypeError [ERR_INVALID_ARG_TYPE]: The "options.lookup" property must be of type function. Received type string ('(...args) => {
In 4.49.0
If I should guess the culprit, I'd say this line:
lookup
is not a string, it's a function.Edit:
confirming that replacing the above line by
this._setValue(opts, 'lookup', options.lookup)
solves the problemThe text was updated successfully, but these errors were encountered: