DataDog / browser-sdk

Datadog Browser SDK
Apache License 2.0
279 stars 130 forks source link

Use the same service/version type in `init()` and `startView()` #2798

Closed BenoitZugmeyer closed 3 weeks ago

BenoitZugmeyer commented 4 weeks ago

Motivation

There is no reason why we shouldn't accept different types there. See https://github.com/DataDog/browser-sdk/pull/2781#issuecomment-2150324514

Changes

Change types, convert falsy values to undefined

Testing


I have gone over the contributing documentation.

codecov-commenter commented 3 weeks ago

Codecov Report

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

Project coverage is 93.63%. Comparing base (81981c0) to head (15d6ede). Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2798 +/- ## ======================================= Coverage 93.63% 93.63% ======================================= Files 243 243 Lines 7112 7112 Branches 1583 1585 +2 ======================================= Hits 6659 6659 Misses 453 453 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

BenoitZugmeyer commented 3 weeks ago

/to-staging

dd-devflow[bot] commented 3 weeks ago

:steam_locomotive: Branch Integration: starting soon, median merge time is 0s

Commit 15d6eded0e will soon be integrated into staging-24.

Use /to-staging -c to cancel this operation!

cit-pr-commenter[bot] commented 3 weeks ago

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 158.74 KiB 158.75 KiB 16 B +0.01%
Logs 57.67 KiB 57.67 KiB 0 B 0.00%
Rum Slim 105.21 KiB 105.22 KiB 16 B +0.01%
Worker 25.21 KiB 25.21 KiB 0 B 0.00%

🚀 CPU Performance | Action Name | Base Average Cpu Time (ms) | Local Average Cpu Time (ms) | 𝚫 | | --- | --- | --- | --- | | addglobalcontext | 0.002 | 0.001 | -0.000 | | addaction | 0.038 | 0.035 | -0.003 | | adderror | 0.035 | 0.034 | -0.001 | | addtiming | 0.001 | 0.001 | -0.000 | | startview | 1.270 | 0.808 | -0.461 | | startstopsessionreplayrecording | 0.942 | 0.743 | -0.199 | | logmessage | 0.006 | 0.005 | -0.001 |
🧠 Memory Performance | Action Name | Base Consumption Memory (bytes) | Local Consumption Memory (bytes) | 𝚫 (bytes) | | --- | --- | --- | --- | | addglobalcontext | 19.68 KiB | 20.39 KiB | 723 B | | addaction | 69.82 KiB | 68.41 KiB | -1435 B | | adderror | 86.51 KiB | 84.44 KiB | -2124 B | | addtiming | 17.55 KiB | 17.12 KiB | -448 B | | startview | 312.30 KiB | 317.70 KiB | 5.40 KiB | | startstopsessionreplayrecording | 12.19 KiB | 12.57 KiB | 387 B | | logmessage | 67.54 KiB | 69.34 KiB | 1.80 KiB |
dd-devflow[bot] commented 3 weeks ago

:steam_locomotive: Branch Integration: This commit was successfully integrated

Commit 15d6eded0e has been merged into staging-24 in merge commit 53e71e2f4a.

Check out the triggered pipeline on Gitlab :fox_face: