Skip to content

Implement Ord and PartialOrd for span ID#3472

Open
soumyasen1809 wants to merge 3 commits intotokio-rs:mainfrom
soumyasen1809:ord_spanid_3462
Open

Implement Ord and PartialOrd for span ID#3472
soumyasen1809 wants to merge 3 commits intotokio-rs:mainfrom
soumyasen1809:ord_spanid_3462

Conversation

@soumyasen1809
Copy link
Copy Markdown

Fixes issue #3462

Motivation

This change implements Ord and PartialOrd for the span::Id type in the tracing-core crate. Currently, span::Id only implements Eq, PartialEq, and Hash. Without Ord, subscriber implementations cannot store span IDs in ordered collections like BTreeMap or BTreeSet.
Fixes issue #3462.

Solution

Added PartialOrd and Ord traits to the Id struct.

@soumyasen1809 soumyasen1809 requested review from a team, hawkw and hds as code owners February 8, 2026 19:52
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.

Implement Ord for span ID

1 participant