We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afc7bc5 commit 979b34fCopy full SHA for 979b34f
api/lib/opentelemetry/trace/tracestate.rb
@@ -75,8 +75,8 @@ def create(hash)
75
# @return [Tracestate]
76
def initialize(hash)
77
excess = hash.size - MAX_MEMBER_COUNT
78
- hash = Hash[hash.drop(excess)] if excess.positive?
79
- @hash = hash.freeze
+ @hash = excess.positive? ? Hash[hash.first(MAX_MEMBER_COUNT)] : hash
+ @hash.freeze
80
end
81
82
# Returns the value associated with the given key, or nil if the key
0 commit comments