Skip to content

Commit e71e1bc

Browse files
docs: fix Resource merge documentation (#1878)
`OpenTelemetry::SDK::Resources::Resource#merge` uses `Hash#merge` under the hood, which overwrites the "current" hash's value with the attributes of the `other` resource, so the docs at present are incorrect. It's possible this is per the spec and the implementation is wrong, but if so, it's likely easier to fix that once they're both aligned. Co-authored-by: Kayla Reopelle <[email protected]>
1 parent 1494d61 commit e71e1bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/lib/opentelemetry/sdk/resources/resource.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def attribute_enumerator
9393
end
9494

9595
# Returns a new, merged {Resource} by merging the current {Resource} with
96-
# the other {Resource}. In case of a collision, the current {Resource}
96+
# the other {Resource}. In case of a collision, the other {Resource}
9797
# takes precedence
9898
#
9999
# @param [Resource] other The other resource to merge

0 commit comments

Comments
 (0)