DataDog / browser-sdk

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

✨ [RUM-4819] Add an experimental 'updateViewName' API #2808

Closed RomanGaignault closed 2 days ago

RomanGaignault commented 3 weeks ago

Motivation

Currently in RUM, when we access a page that contains a redirection path in the router, by using the original (or former) URL, two view events are created for the same page, as RUM does the next assumption: 1 path/URL === 1 view

Changes

In the Browser SDK manual tracking, we could make it possible to update an already created view’s name by creating an new api called updateViewName

image image

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.33%. Comparing base (d45e773) to head (034c839).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2808 +/- ## ========================================== + Coverage 93.30% 93.33% +0.02% ========================================== Files 263 263 Lines 7482 7498 +16 Branches 1669 1671 +2 ========================================== + Hits 6981 6998 +17 + Misses 501 500 -1 ```

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

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

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 160.25 KiB 160.60 KiB 358 B +0.22%
Logs 57.91 KiB 57.94 KiB 38 B +0.06%
Rum Slim 108.77 KiB 109.12 KiB 358 B +0.32%
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.001 | 0.002 | 0.001 | | addaction | 0.029 | 0.059 | 0.030 | | adderror | 0.030 | 0.059 | 0.029 | | addtiming | 0.001 | 0.001 | 0.001 | | startview | 0.899 | 1.975 | 1.077 | | startstopsessionreplayrecording | 0.813 | 1.289 | 0.475 | | logmessage | 0.018 | 0.028 | 0.010 |
🧠 Memory Performance | Action Name | Base Consumption Memory (bytes) | Local Consumption Memory (bytes) | 𝚫 (bytes) | | --- | --- | --- | --- | | addglobalcontext | 20.91 KiB | 20.81 KiB | -96 B | | addaction | 71.98 KiB | 71.65 KiB | -335 B | | adderror | 87.74 KiB | 86.37 KiB | -1402 B | | addtiming | 21.07 KiB | 20.46 KiB | -630 B | | startview | 314.25 KiB | 337.91 KiB | 23.66 KiB | | startstopsessionreplayrecording | 14.55 KiB | 13.49 KiB | -1087 B | | logmessage | 70.63 KiB | 71.78 KiB | 1.15 KiB |

🔗 RealWorld

RomanGaignault commented 2 days ago

/to-staging

dd-devflow[bot] commented 2 days ago

:steam_locomotive: Branch Integration: starting soon, median merge time is 11m

Commit 034c8394d0 will soon be integrated into staging-27.

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

dd-devflow[bot] commented 2 days ago

:steam_locomotive: Branch Integration: This commit was successfully integrated

Commit 034c8394d0 has been merged into staging-27 in merge commit 00dfc9da6d.

Check out the triggered pipeline on Gitlab :fox_face: