Skip to content

[RUM-11252][FO]: DTO schema integration#2816

Merged
satween merged 2 commits into
feature/featureoperationsfrom
tvaleev/feature/RUM-11252
Aug 12, 2025
Merged

[RUM-11252][FO]: DTO schema integration#2816
satween merged 2 commits into
feature/featureoperationsfrom
tvaleev/feature/RUM-11252

Conversation

@satween

@satween satween commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Updates schema vital-schema.json
  • Maps FO api calls to objects creation and sending

Motivation

See RFC in ticket description

Additional Notes

Note that it's not complete P0 implementation.
Debugging logs support, telemetry and name sanitization will be added later.

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 11, 2025 16:32
@satween satween changed the title RUM-11252: DTO schema integration RUM-11252: [FO] DTO schema integration Aug 11, 2025
@codecov-commenter

codecov-commenter commented Aug 11, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.56881% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.93%. Comparing base (eaca227) to head (50b57dc).
⚠️ Report is 4 commits behind head on feature/featureoperations.

Files with missing lines Patch % Lines
.../android/rum/internal/domain/scope/RumViewScope.kt 84.13% 5 Missing and 5 partials ⚠️
...g/android/rum/internal/domain/scope/RumEventExt.kt 41.67% 5 Missing and 2 partials ⚠️
.../datadog/android/rum/internal/RumSessionTypeExt.kt 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           feature/featureoperations    #2816      +/-   ##
=============================================================
+ Coverage                      69.91%   69.93%   +0.02%     
=============================================================
  Files                            835      835              
  Lines                          31303    31412     +109     
  Branches                        5259     5272      +13     
=============================================================
+ Hits                           21885    21966      +81     
- Misses                          7929     7959      +30     
+ Partials                        1489     1487       -2     
Files with missing lines Coverage Δ
...g/android/rum/internal/domain/scope/RumRawEvent.kt 100.00% <100.00%> (ø)
.../android/rum/internal/monitor/DatadogRumMonitor.kt 87.14% <100.00%> (+1.69%) ⬆️
.../datadog/android/rum/internal/RumSessionTypeExt.kt 88.89% <33.33%> (-11.11%) ⬇️
...g/android/rum/internal/domain/scope/RumEventExt.kt 91.80% <41.67%> (-2.63%) ⬇️
.../android/rum/internal/domain/scope/RumViewScope.kt 93.94% <84.13%> (-0.02%) ⬇️

... and 25 files with indirect coverage changes

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

FailureReason.OTHER -> RumVitalEvent.FailureReason.OTHER
}
}
//

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.

nit: shouldn't this be endregion?

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.

will fix in the following PR's

@satween
satween merged commit 2ee8354 into feature/featureoperations Aug 12, 2025
25 checks passed
@satween
satween deleted the tvaleev/feature/RUM-11252 branch August 12, 2025 11:59
Comment on lines +241 to +266
private fun onStartFeatureOperation(event: RumRawEvent.StartFeatureOperation, writer: DataWriter<Any>) {
sdkCore.newRumEventWriteOperation(writer) { datadogContext ->
newVitalEvent(
datadogContext,
name = event.name,
operationKey = event.operationKey,
stepType = RumVitalEvent.StepType.START,
failureReason = null,
attributes = event.attributes
)
}.submit()
sendViewUpdate(event, writer)
}

private fun onStopFeatureOperation(event: RumRawEvent.StopFeatureOperation, writer: DataWriter<Any>) {
sdkCore.newRumEventWriteOperation(writer) { datadogContext ->
newVitalEvent(
datadogContext,
name = event.name,
operationKey = event.operationKey,
stepType = RumVitalEvent.StepType.END,
failureReason = event.failureReason?.toSchemaFailureReason(),
attributes = event.attributes
)
}.submit()
sendViewUpdate(event, writer)

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.

why do we need to send view update if creating/sending vital event doesn't change any state (at least of RumViewScope; it is clear that it might change the state of upstream scopes)?

do we risk exploding the number of view updates?

@satween satween changed the title RUM-11252: [FO] DTO schema integration [RUM-11252][FO]: DTO schema integration Aug 25, 2025
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