Skip to content
New issue

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

Extra host lookup triggered on decorate #16

Open
alawrenc opened this issue Dec 5, 2019 · 1 comment
Open

Extra host lookup triggered on decorate #16

alawrenc opened this issue Dec 5, 2019 · 1 comment

Comments

@alawrenc
Copy link

alawrenc commented Dec 5, 2019

Would it be possible to add a property flag around adding the IP address and port?
Collecting that information isn't useful for us and triggers an extra (undesirable) host lookup on calls.
Caused by: java.net.UnknownHostException: REDACTED at java.net.InetAddress.getAllByName0(InetAddress.java:1281) ~[?:1.8.0_232] at java.net.InetAddress.getAllByName(InetAddress.java:1193) ~[?:1.8.0_232] at java.net.InetAddress.getAllByName(InetAddress.java:1127) ~[?:1.8.0_232] at java.net.InetAddress.getByName(InetAddress.java:1077) ~[?:1.8.0_232] at com.mongodb.ServerAddress.getSocketAddress(ServerAddress.java:188) ~[mongo-java-driver-3.11.0.jar:?]
Looking at https://github.com/opentracing-contrib/java-mongo-driver/blob/release-0.1.5/opentracing-mongo-common/src/main/java/io/opentracing/contrib/mongo/common/SpanDecorator.java#L53 it seems like L53-63 could be put in an if-statement

@malafeev
Copy link

malafeev commented Dec 6, 2019

@alawrenc you should be able to provide own SpanDecorator implementation.
flag also is fine. Would you like to submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants