dd-trace-js icon indicating copy to clipboard operation
dd-trace-js copied to clipboard

DNS promise API not instrumented

Open brainsiq opened this issue 4 years ago • 3 comments

Describe the bug

The Node.js dns module has a promises API (since v10.6.0), through which calls are not traced. This API is used by modules like cacheable-lookup. When I investigated the issue it appeared as though the promises API is not being wrapped by dd-trace.

https://github.com/DataDog/dd-trace-js/blob/036a23745ea1f22de02d36a6e87f907282721f08/packages/datadog-instrumentations/src/dns.js#L22-L38

I think this piece of code just needs to be wrapping dns.promises as it appears from the Node.js source code it's a custom implementation (not re-using the non-promise implementation).

Environment

  • Operation system: Ubuntu 20.04
  • Node version: 14.17.4
  • Tracer version: 1.6.0
  • Agent version: 7.25.1

brainsiq avatar Dec 17 '21 15:12 brainsiq

This should probably be a feature request rather than a bug, as it seems as though you know about this:

https://github.com/DataDog/dd-trace-js/blob/036a23745ea1f22de02d36a6e87f907282721f08/packages/datadog-instrumentations/src/dns.js#L82

brainsiq avatar Dec 17 '21 16:12 brainsiq

Are there any plans to fix this? Is there any workaround available?

vladimirdmi avatar Apr 26 '24 14:04 vladimirdmi

Could you please reach out to our support https://www.datadoghq.com/support/ and request the implementation of the promise API instrumentations? That way it will be prioritized. Otherwise it's more difficult for us to do so.

BridgeAR avatar May 08 '25 21:05 BridgeAR