-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SortTags deduplicates, uses slices.SortStable
golang.org/x/exp/slices has comparable allocation-free sorting, which we can use while reducing our code. Neither Datadog nor Prometheus appear to retain or handle multiple tags with the same name on the same metric, so this package deduplicates at time of sort (latest tag wins). If any metric systems we use do tolerate and provide useful behavior when provided duplicate tag/label names, and the practice is justified, that would be a reason to revert or adjust this deduplication behavior.
- Loading branch information
1 parent
d11a18e
commit d65d2b2
Showing
3 changed files
with
121 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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