attribute: add SLICE type support#8166
Open
pellared wants to merge 13 commits intoopen-telemetry:mainfrom
Open
attribute: add SLICE type support#8166pellared wants to merge 13 commits intoopen-telemetry:mainfrom
pellared wants to merge 13 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8166 +/- ##
=======================================
+ Coverage 82.3% 82.5% +0.1%
=======================================
Files 309 309
Lines 24238 24513 +275
=======================================
+ Hits 19963 20227 +264
- Misses 3898 3909 +11
Partials 377 377
🚀 New features to boost your workflow:
|
This was referenced Apr 10, 2026
dashpole
reviewed
Apr 10, 2026
| // | ||
| // If creating both a key and value at the same time, use the provided | ||
| // convenience function instead -- Slice(name, value). | ||
| func (k Key) Slice(v []Value) KeyValue { |
Contributor
There was a problem hiding this comment.
Would it be more ergonomic for this to be variadic?
// variadic
myKey.Slice(IntValue(1), IntValue(2), IntValue(3))
// vs slice
myKey.Slice([]Value(IntValue(1), IntValue(2), IntValue(3)))Not sure if we would want to change func Slice(k string, v []Value) KeyValue to func Slice(k string, v ...Value) KeyValue` as well though... so maybe consistency is more important?
| h = h.Uint64(byteSliceID) | ||
| h = h.String(kv.Value.stringly) | ||
| h = h.String(v.stringly) | ||
| case SLICE: |
Contributor
There was a problem hiding this comment.
Do we have benchmarks for hashing for slices?
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.
Fixes #7934