Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUM-7528 Introduce the setLastInteractionIdentifier Public API #2428

Conversation

mariusc83
Copy link
Member

@mariusc83 mariusc83 commented Dec 3, 2024

What does this PR do?

Following the RFC we are introducing the setLastInteractionIdentifier API as part of the RumConfiguration#Builder in order to provide external control on which action intercepted on the previous view will be considered as the last interaction leading to the next view needed in the interaction-to-next-view metric computation. The default identifier being used is a TimeBasedInteractionIdentifier with a default threshold interval of 3000ms. More about this you can read in the class docs in the PR itself. This could be re - used by our users in the Configuration Builder by changing the time interval to their internal needs.

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)

@mariusc83 mariusc83 self-assigned this Dec 3, 2024
@mariusc83 mariusc83 force-pushed the mconstantin/rum-7528/add-public-api-for-itnv-identification branch from 31b857c to 6c04bce Compare December 3, 2024 11:44
@codecov-commenter
Copy link

codecov-commenter commented Dec 3, 2024

Codecov Report

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

Project coverage is 70.11%. Comparing base (ce81b20) to head (5a2c9be).
Report is 3 commits behind head on feature/view-loading-times.

Files with missing lines Patch % Lines
...actiontonextview/TimeBasedInteractionIdentifier.kt 90.91% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##           feature/view-loading-times    #2428      +/-   ##
==============================================================
+ Coverage                       70.00%   70.11%   +0.11%     
==============================================================
  Files                             775      775              
  Lines                           28676    28694      +18     
  Branches                         4807     4809       +2     
==============================================================
+ Hits                            20072    20116      +44     
+ Misses                           7278     7251      -27     
- Partials                         1326     1327       +1     
Files with missing lines Coverage Δ
...rum/src/main/kotlin/com/datadog/android/rum/Rum.kt 92.45% <100.00%> (+0.15%) ⬆️
...kotlin/com/datadog/android/rum/RumConfiguration.kt 97.01% <100.00%> (+0.09%) ⬆️
...lin/com/datadog/android/rum/internal/RumFeature.kt 93.07% <100.00%> (+0.43%) ⬆️
...d/rum/internal/domain/scope/RumApplicationScope.kt 94.00% <100.00%> (-0.85%) ⬇️
...droid/rum/internal/domain/scope/RumSessionScope.kt 96.69% <100.00%> (+0.03%) ⬆️
...d/rum/internal/domain/scope/RumViewManagerScope.kt 92.00% <100.00%> (+0.05%) ⬆️
...ntonextview/InteractionToNextViewMetricResolver.kt 96.15% <ø> (ø)
.../android/rum/internal/monitor/DatadogRumMonitor.kt 86.23% <100.00%> (+0.98%) ⬆️
...ontonextview/PreviousViewLastInteractionContext.kt 100.00% <100.00%> (ø)
...ic/networksettled/NetworkSettledResourceContext.kt 100.00% <100.00%> (ø)
... and 1 more

... and 26 files with indirect coverage changes

@mariusc83 mariusc83 force-pushed the mconstantin/rum-7528/add-public-api-for-itnv-identification branch from 6c04bce to e8122d9 Compare December 3, 2024 12:51
@mariusc83 mariusc83 marked this pull request as ready for review December 3, 2024 13:11
@mariusc83 mariusc83 requested review from a team as code owners December 3, 2024 13:11
xgouchet
xgouchet previously approved these changes Dec 3, 2024
@@ -260,7 +261,7 @@ data class RumConfiguration internal constructor(
}

/**
* Sets the identifier strategy for initial network resources used to compute the time to network settled
* Sets a custom identifier for initial network resources used to compute the time to network settled
Copy link
Member

Choose a reason for hiding this comment

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

Note

Nitpick: this should belong in the previous PR

@mariusc83 mariusc83 force-pushed the mconstantin/rum-7174/add-timing-strategy-for-ttns-requests-identification branch from 85893e3 to 48ab0a2 Compare December 4, 2024 09:15
Base automatically changed from mconstantin/rum-7174/add-timing-strategy-for-ttns-requests-identification to feature/view-loading-times December 4, 2024 12:55
@mariusc83 mariusc83 dismissed xgouchet’s stale review December 4, 2024 12:55

The base branch was changed.

@mariusc83 mariusc83 force-pushed the mconstantin/rum-7528/add-public-api-for-itnv-identification branch from e8122d9 to 5a2c9be Compare December 4, 2024 13:48
@mariusc83 mariusc83 requested a review from xgouchet December 4, 2024 15:02
@mariusc83 mariusc83 merged commit c6c77ea into feature/view-loading-times Dec 4, 2024
25 checks passed
@mariusc83 mariusc83 deleted the mconstantin/rum-7528/add-public-api-for-itnv-identification branch December 4, 2024 16:15
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.

3 participants