open-telemetry / opentelemetry-js

OpenTelemetry JavaScript Client
https://opentelemetry.io
Apache License 2.0
2.75k stars 808 forks source link

refactor(resources)!: replace ResourceAttributes with Attributes #5016

Closed david-luna closed 1 month ago

david-luna commented 1 month ago

Which problem is this PR solving?

Replaces ResourceAttributes with Attributes

Refs #4175

Short description of the changes

Replace the interfaces in sources & tests. This PR targeting next since the version bump of @opentelemetry/api package and the changes in public types make it a breaking change.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.96%. Comparing base (32564ad) to head (15bb139). Report is 3 commits behind head on next.

Files with missing lines Patch % Lines
...try-resources/src/detectors/BrowserDetectorSync.ts 0.00% 1 Missing :warning:
...ors/platform/node/ServiceInstanceIdDetectorSync.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## next #5016 +/- ## ======================================= Coverage 93.96% 93.96% ======================================= Files 310 310 Lines 8147 8147 Branches 1630 1630 ======================================= Hits 7655 7655 Misses 492 492 ``` | [Files with missing lines](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5016?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [packages/opentelemetry-resources/src/Resource.ts](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5016?src=pr&el=tree&filepath=packages%2Fopentelemetry-resources%2Fsrc%2FResource.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cGFja2FnZXMvb3BlbnRlbGVtZXRyeS1yZXNvdXJjZXMvc3JjL1Jlc291cmNlLnRz) | `100.00% <100.00%> (ø)` | | | [...lemetry-resources/src/detectors/EnvDetectorSync.ts](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5016?src=pr&el=tree&filepath=packages%2Fopentelemetry-resources%2Fsrc%2Fdetectors%2FEnvDetectorSync.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cGFja2FnZXMvb3BlbnRlbGVtZXRyeS1yZXNvdXJjZXMvc3JjL2RldGVjdG9ycy9FbnZEZXRlY3RvclN5bmMudHM=) | `94.11% <100.00%> (ø)` | | | [...es/src/detectors/platform/node/HostDetectorSync.ts](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5016?src=pr&el=tree&filepath=packages%2Fopentelemetry-resources%2Fsrc%2Fdetectors%2Fplatform%2Fnode%2FHostDetectorSync.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cGFja2FnZXMvb3BlbnRlbGVtZXRyeS1yZXNvdXJjZXMvc3JjL2RldGVjdG9ycy9wbGF0Zm9ybS9ub2RlL0hvc3REZXRlY3RvclN5bmMudHM=) | `100.00% <100.00%> (ø)` | | | [...rces/src/detectors/platform/node/OSDetectorSync.ts](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5016?src=pr&el=tree&filepath=packages%2Fopentelemetry-resources%2Fsrc%2Fdetectors%2Fplatform%2Fnode%2FOSDetectorSync.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cGFja2FnZXMvb3BlbnRlbGVtZXRyeS1yZXNvdXJjZXMvc3JjL2RldGVjdG9ycy9wbGF0Zm9ybS9ub2RlL09TRGV0ZWN0b3JTeW5jLnRz) | `100.00% <100.00%> (ø)` | | | [...src/detectors/platform/node/ProcessDetectorSync.ts](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5016?src=pr&el=tree&filepath=packages%2Fopentelemetry-resources%2Fsrc%2Fdetectors%2Fplatform%2Fnode%2FProcessDetectorSync.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cGFja2FnZXMvb3BlbnRlbGVtZXRyeS1yZXNvdXJjZXMvc3JjL2RldGVjdG9ycy9wbGF0Zm9ybS9ub2RlL1Byb2Nlc3NEZXRlY3RvclN5bmMudHM=) | `92.85% <100.00%> (ø)` | | | [...try-resources/src/detectors/BrowserDetectorSync.ts](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5016?src=pr&el=tree&filepath=packages%2Fopentelemetry-resources%2Fsrc%2Fdetectors%2FBrowserDetectorSync.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cGFja2FnZXMvb3BlbnRlbGVtZXRyeS1yZXNvdXJjZXMvc3JjL2RldGVjdG9ycy9Ccm93c2VyRGV0ZWN0b3JTeW5jLnRz) | `52.94% <0.00%> (ø)` | | | [...ors/platform/node/ServiceInstanceIdDetectorSync.ts](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5016?src=pr&el=tree&filepath=packages%2Fopentelemetry-resources%2Fsrc%2Fdetectors%2Fplatform%2Fnode%2FServiceInstanceIdDetectorSync.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-cGFja2FnZXMvb3BlbnRlbGVtZXRyeS1yZXNvdXJjZXMvc3JjL2RldGVjdG9ycy9wbGF0Zm9ybS9ub2RlL1NlcnZpY2VJbnN0YW5jZUlkRGV0ZWN0b3JTeW5jLnRz) | `57.14% <0.00%> (ø)` | |