perf: Do not allocate for scope attributes that collide with reserved ones#3548
Merged
Merged
Conversation
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
ArthurSens
commented
Jun 10, 2026
Comment on lines
430
to
432
| if RESERVED_SCOPE_LABELS.contains(&label_name.as_str()) { | ||
| continue; | ||
| } |
Member
Author
There was a problem hiding this comment.
I considered removing this, but if we get something like schema-url, it will become schema_url after sanitization, and we need to drop it as well.
Is there a way that we can avoid allocation when they match a regex? I assume not, since regex is usually more resource-intensive than an exact match...?
Member
There was a problem hiding this comment.
agreed. this PR is good as-is.
cijothomas
approved these changes
Jun 10, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3548 +/- ##
=======================================
- Coverage 82.8% 82.8% -0.1%
=======================================
Files 130 130
Lines 27353 27356 +3
=======================================
Hits 22675 22675
- Misses 4678 4681 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merged
via the queue into
open-telemetry:main
with commit Jun 10, 2026
3e12c94
27 of 28 checks passed
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.
Follow up from #3503 (comment)
Changes
Prevent allocation in
format!for labels that we know will collide with reserved ones.Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial, user-facing changes