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

Extract net.peer.{name,port} on start for CLIENT spans #6828

Merged

Conversation

mateuszrzeszutek
Copy link
Member

The HTTP spec says these two attributes must be provided at span creation time - I think it makes sense to extend it over to all net-related instrumentations, cause these are supposed to be the logical peer name/port, which are supposed to be known before the connection is started/exchange is made.

@mateuszrzeszutek mateuszrzeszutek requested a review from a team October 7, 2022 10:24
Comment on lines -25 to -28
if (response != null) {
return response.getHost().getHostName();
}
return null;
Copy link
Member Author

Choose a reason for hiding this comment

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

The elasticsearch-rest instrumentations are the only ones that actually lost some data because of this change - but I'd argue that it's not that important, because it uses the Apache HTTP client to make all the REST calls, so you'll still have the peer name&port on the child HTTP CLIENT span.

Copy link
Member

Choose a reason for hiding this comment

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

I'll open an issue to track this, but agree it's not that important

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines -25 to -28
if (response != null) {
return response.getHost().getHostName();
}
return null;
Copy link
Member

Choose a reason for hiding this comment

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

I'll open an issue to track this, but agree it's not that important

@trask trask merged commit 77035fc into open-telemetry:main Oct 10, 2022
@mateuszrzeszutek mateuszrzeszutek deleted the extract-peer-name-port-on-start branch October 11, 2022 06:39
LironKS pushed a commit to helios/opentelemetry-java-instrumentation that referenced this pull request Oct 23, 2022
…try#6828)

The [HTTP
spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-client)
says these two attributes must be provided at span creation time - I
think it makes sense to extend it over to all `net`-related
instrumentations, cause these are supposed to be the logical peer
name/port, which are supposed to be known before the connection is
started/exchange is made.
LironKS pushed a commit to helios/opentelemetry-java-instrumentation that referenced this pull request Oct 31, 2022
…try#6828)

The [HTTP
spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-client)
says these two attributes must be provided at span creation time - I
think it makes sense to extend it over to all `net`-related
instrumentations, cause these are supposed to be the logical peer
name/port, which are supposed to be known before the connection is
started/exchange is made.
LironKS pushed a commit to helios/opentelemetry-java-instrumentation that referenced this pull request Dec 4, 2022
…try#6828)

The [HTTP
spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-client)
says these two attributes must be provided at span creation time - I
think it makes sense to extend it over to all `net`-related
instrumentations, cause these are supposed to be the logical peer
name/port, which are supposed to be known before the connection is
started/exchange is made.
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.

2 participants