Skip to content

Conversation

@aleksandr-gringauz
Copy link
Contributor

@aleksandr-gringauz aleksandr-gringauz commented Nov 5, 2025

What does this PR do?

Adding vitalAppLaunchEventMapper similar to vitalOperationStepEventMapper now that app launch vital events have a separate type.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

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)

@datadog-official
Copy link

datadog-official bot commented Nov 5, 2025

🎯 Code Coverage
Patch Coverage: 80.00%
Total Coverage: 71.04% (-0.01%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 58ca36d | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.03%. Comparing base (2708d99) to head (58ca36d).

Additional details and impacted files
@@                               Coverage Diff                                @@
##           aleksandr-gringauz/feature/app-launch-vitals    #2987      +/-   ##
================================================================================
+ Coverage                                         70.99%   71.03%   +0.05%     
================================================================================
  Files                                               831      831              
  Lines                                             30659    30666       +7     
  Branches                                           5216     5217       +1     
================================================================================
+ Hits                                              21764    21783      +19     
- Misses                                             7399     7400       +1     
+ Partials                                           1496     1483      -13     
Files with missing lines Coverage Δ
...kotlin/com/datadog/android/rum/RumConfiguration.kt 96.39% <100.00%> (+0.09%) ⬆️
...lin/com/datadog/android/rum/internal/RumFeature.kt 89.78% <100.00%> (+0.32%) ⬆️
...ndroid/rum/internal/domain/event/RumEventMapper.kt 100.00% <100.00%> (ø)

... and 27 files with indirect coverage changes

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

@aleksandr-gringauz aleksandr-gringauz marked this pull request as ready for review November 6, 2025 11:04
@aleksandr-gringauz aleksandr-gringauz requested review from a team as code owners November 6, 2025 11:04
Comment on lines 78 to +79
fun setVitalOperationStepEventMapper(com.datadog.android.event.EventMapper<com.datadog.android.rum.model.RumVitalOperationStepEvent>): Builder
fun setVitalAppLaunchEventMapper(com.datadog.android.event.EventMapper<com.datadog.android.rum.model.RumVitalAppLaunchEvent>): Builder
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if we want to expose them in such shape. Maybe we can group them and introduce a single method here withVitalEventMappers(operationsMapper = ..., appLaunchMapper = ..., ....).

With current layout these methods seems to be very verbose among the other methods in this Builder.

Maybe we need to ask iOS SDK what will be their approach regarding this as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or maybe we should revert to setVitaEventMapper and use them for the all the vital events 🙂

Copy link
Contributor Author

@aleksandr-gringauz aleksandr-gringauz Nov 10, 2025

Choose a reason for hiding this comment

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

@satween What arguments should setVitaEventMapper have? Same as @0xnm suggested?

I was thinking about something like this: https://pl.kotl.in/nNeN0bmfx

Note that currently VitalEvent from this example doesn't exist in our code. OperationStepVital and AppLaunchVital don't have a common parent type. We could change it though.

But I still lean towards the solution with a separate method per vital type.

We started discussing it with @simaoseica-dd, but not finished yet.

@aleksandr-gringauz aleksandr-gringauz force-pushed the aleksandr-gringauz/feature/app-launch-vitals-mapper branch from 84212fe to 58ca36d Compare November 6, 2025 16:12
@aleksandr-gringauz aleksandr-gringauz force-pushed the aleksandr-gringauz/feature/app-launch-vitals branch 2 times, most recently from 1c884cb to 39cc533 Compare November 14, 2025 10:08
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.

7 participants