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

Remove conditional requirement on network.peer.address and network.peer.port #449

Merged
merged 11 commits into from
Oct 30, 2023

Conversation

trask
Copy link
Member

@trask trask commented Oct 25, 2023

I missed these in #342.

Based on #342 (comment):

I disagree with not populating. Then you'll need a database of instrumentation library version/name to find if absence means "not implemented" or "same".

we decided to remove the conditional and always populate these attributes when network-layer instrumentation exists.

Changes

Remove conditional requirement on network.peer.address and network.peer.port.

Merge requirement checklist

@trask trask marked this pull request as ready for review October 25, 2023 22:38
@trask trask requested review from a team October 25, 2023 22:38
Copy link
Member

@mateuszrzeszutek mateuszrzeszutek left a comment

Choose a reason for hiding this comment

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

Should we do the same thing for the server.port in HTTP server spans? Currently the spec says it's conditionally required:

If server.address is set and the port is not default (80 for http scheme, 443 for https).

Should we remove the "If server.address is set" part?

@trask
Copy link
Member Author

trask commented Oct 26, 2023

Should we do the same thing for the server.port in HTTP server spans? Currently the spec says it's conditionally required:

If server.address is set and the port is not default (80 for http scheme, 443 for https).

Should we remove the "If server.address is set" part?

My understanding is that if we remove that part, then server.port becomes required (when non-default) even if you don't set server.address (which we dropped from required to recommended in #114)

@trask
Copy link
Member Author

trask commented Oct 26, 2023

oh, maybe you're suggesting then that we (similarly) make network.peer.port conditionally required (on HTTP client spans):

If network.peer.address is set and the port is not default (80 for http scheme, 443 for https).

that seems to make sense to me

@mateuszrzeszutek
Copy link
Member

oh, maybe you're suggesting then that we (similarly) make network.peer.port conditionally required (on HTTP client spans):

I didn't mean that actually.
This change makes it possible to set network.peer.port without network.peer.address -- or, at the very least, that's how I read it. I thought it introduces some asymmetry between how we treat the server.* and network.(peer|local).* attributes.

@trask
Copy link
Member Author

trask commented Oct 26, 2023

This change makes it possible to set network.peer.port without network.peer.address -- or, at the very least, that's how I read it. I thought it introduces some asymmetry between how we treat the server.* and network.(peer|local).* attributes.

ya, it's a good point

do you think of adding similar condition on network.peer.port addresses the issue?

If network.peer.address is set and the port is not default (80 for http scheme, 443 for https).

@mateuszrzeszutek
Copy link
Member

If network.peer.address is set

This PR removed that part 😄 -- yes, I think reverting it back would resolve the confusion.
About the port condition: I think it's not relevant to my concern, personally I'd probably prefer to leave it as it is -- while the server.* attributes are semantically tied to HTTP (in the context of this document), the network level attributes may provide a bit broader context without HTTP-specific restrictions (e.g. like network.transport and .type if they weren't opt in).

@trask
Copy link
Member Author

trask commented Oct 26, 2023

If network.peer.address is set

This PR removed that part 😄 -- yes, I think reverting it back would resolve the confusion. About the port condition: I think it's not relevant to my concern, personally I'd probably prefer to leave it as it is -- while the server.* attributes are semantically tied to HTTP (in the context of this document), the network level attributes may provide a bit broader context without HTTP-specific restrictions (e.g. like network.transport and .type if they weren't opt in).

👍 fixed

@trask
Copy link
Member Author

trask commented Oct 26, 2023

@AlexanderWert, @lmolkova, @mateuszrzeszutek and @trisch-me - I reset all the approvals because I've made additional changes, ptal, thx

@AlexanderWert AlexanderWert merged commit 3070635 into open-telemetry:main Oct 30, 2023
8 checks passed
@trask trask deleted the fix-conditional-requirement branch October 14, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants