Skip to content

[RUM-11251][FO]: Fix RumVitalEvent serialization logic#2828

Merged
satween merged 2 commits into
feature/featureoperationsfrom
tvaleev/feature/RUM-11251-fix-serialization
Aug 21, 2025
Merged

[RUM-11251][FO]: Fix RumVitalEvent serialization logic#2828
satween merged 2 commits into
feature/featureoperationsfrom
tvaleev/feature/RUM-11251-fix-serialization

Conversation

@satween

@satween satween commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

It turned out that vital event wasn't sent to backend because there was no serialization logic added.
(back-end wasn't ready at the previous iterations, so it was hard to notice any issues)

I've added serialization same way it's done for other events like LongTaskEvent, ViewEvent etc.
As (according to schema) RumVitalEvent also contains usr, context and account sanitization for those attributes was also added.

I've also added support for setVitalEventMapper and added custom mapper for sample and benchmarking apps.

Please let me know if some of those changes were unnecessary.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@satween
satween requested review from a team as code owners August 20, 2025 16:37
@codecov-commenter

codecov-commenter commented Aug 20, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.12%. Comparing base (ef04491) to head (c1101c6).
⚠️ Report is 398 commits behind head on feature/featureoperations.

Files with missing lines Patch % Lines
...id/rum/internal/domain/event/RumEventSerializer.kt 78.95% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           feature/featureoperations    #2828      +/-   ##
=============================================================
+ Coverage                      69.95%   70.12%   +0.17%     
=============================================================
  Files                            835      835              
  Lines                          31418    31448      +30     
  Branches                        5272     5277       +5     
=============================================================
+ Hits                           21978    22051      +73     
+ Misses                          7952     7932      -20     
+ Partials                        1488     1465      -23     
Files with missing lines Coverage Δ
...kotlin/com/datadog/android/rum/RumConfiguration.kt 97.50% <100.00%> (+0.06%) ⬆️
...lin/com/datadog/android/rum/internal/RumFeature.kt 93.22% <100.00%> (+0.88%) ⬆️
...ndroid/rum/internal/domain/event/RumEventMapper.kt 100.00% <100.00%> (ø)
...id/rum/internal/domain/event/RumEventSerializer.kt 84.15% <78.95%> (-0.60%) ⬇️

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

fun setActionEventMapper(com.datadog.android.event.EventMapper<com.datadog.android.rum.model.ActionEvent>): Builder
fun setErrorEventMapper(com.datadog.android.event.EventMapper<com.datadog.android.rum.model.ErrorEvent>): Builder
fun setLongTaskEventMapper(com.datadog.android.event.EventMapper<com.datadog.android.rum.model.LongTaskEvent>): Builder
fun setVitalEventMapper(com.datadog.android.event.EventMapper<com.datadog.android.rum.model.RumVitalEvent>): Builder

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be called VitalEvent, because for other events Rum prefix is removed. Can you please do this change as a part of this PR?

@satween satween Aug 21, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make it in the separate one because the amount of changes will be big enough

@satween
satween merged commit fd55c46 into feature/featureoperations Aug 21, 2025
25 checks passed
@satween
satween deleted the tvaleev/feature/RUM-11251-fix-serialization branch August 21, 2025 10:15
@ncreated
ncreated restored the tvaleev/feature/RUM-11251-fix-serialization branch April 9, 2026 10:21
@0xnm
0xnm deleted the tvaleev/feature/RUM-11251-fix-serialization branch April 24, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants