DNS promise API not instrumented
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
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
Are there any plans to fix this? Is there any workaround available?
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.