Skip to content

Conversation

@srikanthccv
Copy link
Member

Resource Merge Spec

The resulting resource MUST have all attributes that are on any of the two input resources. If a key exists on both the old and updating resource, the value of the updating resource MUST be picked (even if the updated value is empty).

This commit updates the resource collision precedence.

@codecov
Copy link

codecov bot commented Feb 28, 2021

Codecov Report

Merging #1975 (356e5e2) into main (3588601) will increase coverage by 0.05%.
The diff coverage is n/a.

@@ Coverage Diff @@ ## main #1975 +/- ## ========================================== + Coverage 92.87% 92.92% +0.05%  ========================================== Files 152 152 Lines 5922 5922 Branches 1245 1245 ========================================== + Hits 5500 5503 +3  + Misses 422 419 -3 
Impacted Files Coverage Δ
packages/opentelemetry-resources/src/Resource.ts 100.00% <ø> (ø)
...ges/opentelemetry-instrumentation-http/src/http.ts 95.51% <0.00%> (+0.81%) ⬆️
...emetry-core/src/platform/node/RandomIdGenerator.ts 93.75% <0.00%> (+6.25%) ⬆️
@dyladan
Copy link
Member

dyladan commented Mar 1, 2021

Can you add this to the upgrade guidelines in the README since it is a breaking change?

@srikanthccv
Copy link
Member Author

@dyladan I have added the new entry.

Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
@dyladan dyladan changed the title fix: update resource collision precedence fix: specification compliant resource collision precedence Mar 1, 2021
@dyladan
Copy link
Member

dyladan commented Mar 1, 2021

Looks good but I want to wait for @obecny since this PR is only 1 day old and it was a weekend

Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm,
one comment, hope you can address it before merge.

Co-authored-by: Bartlomiej Obecny <bobecny@gmail.com>
@dyladan dyladan merged commit 4c609aa into open-telemetry:main Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants