DataDog / browser-sdk

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

✨⚗️ [RUM-4469] introduce a plugin system #2809

Closed BenoitZugmeyer closed 2 weeks ago

BenoitZugmeyer commented 3 weeks ago

Motivation

Experiment with a plugin system to provide custom integrations.

This is experimental: the plugin interface might change in any version, be warned!

Changes

Testing


I have gone over the contributing documentation.

codecov-commenter commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Project coverage is 93.66%. Comparing base (9b21a36) to head (5c5e461). Report is 1 commits behind head on main.

Files Patch % Lines
packages/rum-core/src/domain/plugins.ts 85.71% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2809 +/- ## ========================================== - Coverage 93.66% 93.66% -0.01% ========================================== Files 244 245 +1 Lines 7168 7181 +13 Branches 1605 1611 +6 ========================================== + Hits 6714 6726 +12 - Misses 454 455 +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.07 KiB 160.44 KiB 379 B +0.23%
Logs 58.07 KiB 58.09 KiB 20 B +0.03%
Rum Slim 108.65 KiB 109.02 KiB 379 B +0.34%
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.002 | 0.000 | | addaction | 0.035 | 0.038 | 0.002 | | adderror | 0.038 | 0.033 | -0.006 | | addtiming | 0.001 | 0.001 | -0.000 | | startview | 1.354 | 1.069 | -0.285 | | startstopsessionreplayrecording | 0.989 | 1.106 | 0.117 | | logmessage | 0.020 | 0.023 | 0.003 |
🧠 Memory Performance | Action Name | Base Consumption Memory (bytes) | Local Consumption Memory (bytes) | 𝚫 (bytes) | | --- | --- | --- | --- | | addglobalcontext | 20.64 KiB | 18.83 KiB | -1855 B | | addaction | 69.28 KiB | 69.23 KiB | -50 B | | adderror | 84.99 KiB | 84.92 KiB | -64 B | | addtiming | 17.99 KiB | 15.84 KiB | -2201 B | | startview | 314.13 KiB | 320.54 KiB | 6.41 KiB | | startstopsessionreplayrecording | 13.31 KiB | 13.57 KiB | 262 B | | logmessage | 69.38 KiB | 67.67 KiB | -1748 B |

🔗 RealWorld