Skip to content

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

Merged
trask merged 1 commit into
open-telemetry:mainfrom
mateuszrzeszutek:extract-peer-name-port-on-start
Oct 10, 2022
Merged

Extract net.peer.{name,port} on start for CLIENT spans#6828
trask merged 1 commit into
open-telemetry:mainfrom
mateuszrzeszutek:extract-peer-name-port-on-start

Conversation

@mateuszrzeszutek

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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