feat(tracing): add telemetry span kind#5526
Open
gacevicljubisa wants to merge 6 commits into
Open
Conversation
martinconic
approved these changes
Jul 8, 2026
| defer action.Cleanup() | ||
|
|
||
| spanInner.SetAttributes(attribute.String("peer_address", peer.String())) | ||
| spanInner.SetAttributes(attribute.String("swarm.peer.address", peer.String())) |
Contributor
There was a problem hiding this comment.
The server handler tags the remote as swarm.peer.sender_address while here the client tags the remote peer as the generic swarm.peer.address. Should we have here something like swarm.peer.target_address ?
Member
Author
There was a problem hiding this comment.
Good catch on asymmetry. And after some digging, my opinion is that it would be better to drop the role, and use added span kind we just introduced. That way on the client push span, the peer is the destination, and on the server handler span, the peer is the source. This way, spans are role agnostic. What do you think?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Description
P2P spans are now tagged with client/server span kinds so trace UIs render request/response relationships correctly, and all span attributes are namespaced under swarm.* (e.g. address → swarm.chunk.address, tag_id → swarm.tag.id, success → swarm.operation.success) to align with OpenTelemetry semantic-convention naming. The go.mod indirect dependencies are also consolidated into a single block with no version changes. These are trace-annotation changes only, no behavioral impact.
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):
AI Disclosure