open-telemetry / opentelemetry-js

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

fix(events,logs): drop outdated API from devDependencies and align types #5013

Closed pichlermarc closed 2 days ago

pichlermarc commented 3 days ago

Which problem is this PR solving?

I saw that there's two devDependency entries old @opentelemetry/api-events and @opentelemetry/api-logs packages, which cause an old package to be present for these two packages.

The current version is actually specified as a dependency so removing the devDependency is safe.

Since the devDependency pulled in the local types, we had some type-mismatch with in @opentelemetry/sdk-logs where null was not an allowed input with the changed type.

Type of change

How Has This Been Tested?

codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.94%. Comparing base (f8ab559) to head (9a7bc19). Report is 18 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5013 +/- ## ========================================== + Coverage 93.39% 93.94% +0.54% ========================================== Files 46 310 +264 Lines 712 8138 +7426 Branches 120 1633 +1513 ========================================== + Hits 665 7645 +6980 - Misses 47 493 +446 ``` | [Files with missing lines](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5013?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [experimental/packages/sdk-logs/src/LogRecord.ts](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5013?src=pr&el=tree&filepath=experimental%2Fpackages%2Fsdk-logs%2Fsrc%2FLogRecord.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-ZXhwZXJpbWVudGFsL3BhY2thZ2VzL3Nkay1sb2dzL3NyYy9Mb2dSZWNvcmQudHM=) | `98.09% <100.00%> (ø)` | | ... and [265 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-js/pull/5013/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)