We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
> const dgram = require('dgram'); undefined > const server = dgram.createSocket('udp4'); undefined > server.send('hi', 0, 2, 8125, '127.0.0.1', console.log) undefined > null 2
This results in a dns.lookup(), provided that an address is being passed to it, it should not have to.
Always
As per https://nodejs.org/api/dgram.html#dgram_socket_send_msg_offset_length_port_address_callback
The address argument is a string. If the value of address is a host name, DNS will be used to resolve the address of the host.
Implies that if it is not a host name, DNS will not be used. I.e. I would not expect dns to be used if not a host name.
dns.lookup() being called
I was able to observe dns trace by instrumenting with https://github.com/open-telemetry/opentelemetry-js-contrib/tree/master/plugins/node/opentelemetry-plugin-dns
The text was updated successfully, but these errors were encountered:
There is no bug here. dns.lookup() has a fast path for IP addresses, hence there's no need for the dgram module to perform any special casing.
dns.lookup()
dgram
Closing but thanks anyway for the report.
Sorry, something went wrong.
There is no bug here. dns.lookup() has a fast path for IP addresses, hence there's no need for the dgram module to perform any special casing. Closing but thanks anyway for the report.
Thanks for explaining! It may be worthwhile to mention that in docs.
You can send a documentation pull request if you want.
Okidokie
No branches or pull requests
What steps will reproduce the bug?
This results in a dns.lookup(), provided that an address is being passed to it, it should not have to.
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
As per https://nodejs.org/api/dgram.html#dgram_socket_send_msg_offset_length_port_address_callback
Implies that if it is not a host name, DNS will not be used. I.e. I would not expect dns to be used if not a host name.
What do you see instead?
dns.lookup() being called
Additional information
I was able to observe dns trace by instrumenting with https://github.com/open-telemetry/opentelemetry-js-contrib/tree/master/plugins/node/opentelemetry-plugin-dns
The text was updated successfully, but these errors were encountered: