Skip to content

Fix missing remoteAddress in Dubbo plugin #13841

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

steverao
Copy link
Contributor

Resolved #13786

@steverao steverao requested a review from a team as a code owner May 12, 2025 11:27
@steverao steverao marked this pull request as draft May 13, 2025 06:04
return new AutoValue_DubboRequest(
invocation,
context,
context.getUrl(),
context.getRemoteAddress(),
context.getUrl().toInetSocketAddress(),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to check context.getRemoteAddress() first as it has been running smoothly for previous versions. Fallback tocontext.getUrl().toInetSocketAddress() when context.getRemoteAddress() is empty.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toInetSocketAddress calls InetAddress.getByName while the descriptions of https://opentelemetry.io/docs/specs/semconv/attributes-registry/network/#network-peer-address does not say anything about avoiding dns lookups https://opentelemetry.io/docs/specs/semconv/http/http-spans/ mentions that for client.address and server.address reverse DNS lookup should be avoided. Secondly when a name to ip resolution is used and there are multiple ip addresses for the same name you could end up with the wrong ip.
In my opinion you could alternative options. Perhaps it would make sense to fill client address/port and server address/port besides network.peer.address? If remote address isn't available on the server side then if it is guaranteed that the url contains an ip you could implement an overload from NetworkAttributesGetter that does not require an InetSocketAddress.

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

Successfully merging this pull request may close these issues.

Unable to query the expected remoteAddress in the Dubbo instrumentation for certain versions.
3 participants