Skip to content

[flags] FFL-1113: RUM Evaluation Tracking#2926

Merged
jonathanmos merged 3 commits into
feature/feature-flaggingfrom
jmoskovich/ffl-1113/rum-ff-tracking
Oct 16, 2025
Merged

[flags] FFL-1113: RUM Evaluation Tracking#2926
jonathanmos merged 3 commits into
feature/feature-flaggingfrom
jmoskovich/ffl-1113/rum-ff-tracking

Conversation

@jonathanmos

@jonathanmos jonathanmos commented Oct 9, 2025

Copy link
Copy Markdown
Member

What does this PR do?

• Evaluation tracking through RUM

This is controlled by the rumIntegrationEnabled flag in FlagsConfiguration (enabled by default). No deduplication is performed for these requests.

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)

@jonathanmos
jonathanmos force-pushed the jmoskovich/ffl-1113/rum-ff-tracking branch from e904a4b to 8263dbf Compare October 9, 2025 15:30
@codecov-commenter

codecov-commenter commented Oct 9, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.75%. Comparing base (a70a89e) to head (fafab47).
⚠️ Report is 189 commits behind head on feature/feature-flagging.

Files with missing lines Patch % Lines
.../datadog/android/flags/featureflags/FlagsClient.kt 27.27% 15 Missing and 1 partial ⚠️
...android/internal/flags/RumFlagEvaluationMessage.kt 0.00% 3 Missing ⚠️
...in/com/datadog/android/flags/FlagsConfiguration.kt 71.43% 2 Missing ⚠️
.../flags/featureflags/internal/DatadogFlagsClient.kt 96.30% 1 Missing ⚠️
...lin/com/datadog/android/rum/internal/RumFeature.kt 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##           feature/feature-flagging    #2926      +/-   ##
============================================================
- Coverage                     70.76%   70.75%   -0.02%     
============================================================
  Files                           835      837       +2     
  Lines                         30388    30430      +42     
  Branches                       5132     5135       +3     
============================================================
+ Hits                          21504    21528      +24     
- Misses                         7431     7439       +8     
- Partials                       1453     1463      +10     
Files with missing lines Coverage Δ
...flags/featureflags/internal/RumEvaluationLogger.kt 100.00% <100.00%> (ø)
.../flags/featureflags/internal/DatadogFlagsClient.kt 96.15% <96.30%> (+9.31%) ⬆️
...lin/com/datadog/android/rum/internal/RumFeature.kt 91.84% <75.00%> (-0.95%) ⬇️
...in/com/datadog/android/flags/FlagsConfiguration.kt 90.48% <71.43%> (-9.52%) ⬇️
...android/internal/flags/RumFlagEvaluationMessage.kt 0.00% <0.00%> (ø)
.../datadog/android/flags/featureflags/FlagsClient.kt 35.58% <27.27%> (-0.59%) ⬇️

... and 39 files with indirect coverage changes

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

@jonathanmos
jonathanmos force-pushed the jmoskovich/ffl-1113/rum-ff-tracking branch 4 times, most recently from 2697635 to ba4a606 Compare October 15, 2025 08:05
@jonathanmos jonathanmos changed the title [Feature flags] RUM Exposure Tracking [Feature flags] FFL-1113: RUM Evaluation Tracking Oct 15, 2025
@jonathanmos
jonathanmos force-pushed the jmoskovich/ffl-1113/rum-ff-tracking branch 3 times, most recently from 2f7a86c to 82fe14a Compare October 15, 2025 09:40
@jonathanmos
jonathanmos marked this pull request as ready for review October 15, 2025 10:22
@jonathanmos
jonathanmos requested review from a team as code owners October 15, 2025 10:22
@jonathanmos jonathanmos changed the title [Feature flags] FFL-1113: RUM Evaluation Tracking [flags] FFL-1113: RUM Evaluation Tracking Oct 15, 2025
* This is enabled by default.
* @param enabled whether flag evaluation events are logged with RUM.
*/
fun rumIntegrationEnabled(enabled: Boolean): 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.

I think we need to check this with iOS if it should be rumIntegrationEnabled or enableRumIntegration.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

They are using the same property name

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

enableRumIntegration would match the active voice of the other builder methods, ex: useCustom..., trackExposures.
My vote is for consistency across the SDKs first, but preferably there is also internal consistency

* @param flagKey name of the flag.
* @param value value of the flag.
*/
data class RumFlagEvaluationMessage(

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.

minor: if we expect value to be only one of the given types (like String, Int, Double) we can use sealed class here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll make a note to do this, but will defer for a future pr

@jonathanmos
jonathanmos requested a review from typotter October 16, 2025 07:36
@jonathanmos
jonathanmos force-pushed the jmoskovich/ffl-1113/rum-ff-tracking branch from 82fe14a to 01ccba9 Compare October 16, 2025 12:47
@jonathanmos
jonathanmos force-pushed the jmoskovich/ffl-1113/rum-ff-tracking branch from 01ccba9 to fafab47 Compare October 16, 2025 12:51
@jonathanmos
jonathanmos requested a review from 0xnm October 16, 2025 14:10

@typotter typotter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm. If we concur on logging to RUM when the default is returned, we can make that change in a followup

* This is enabled by default.
* @param enabled whether flag evaluation events are logged with RUM.
*/
fun rumIntegrationEnabled(enabled: Boolean): Builder {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

enableRumIntegration would match the active voice of the other builder methods, ex: useCustom..., trackExposures.
My vote is for consistency across the SDKs first, but preferably there is also internal consistency

Comment on lines +176 to +177
} else {
if (flagsConfiguration.trackExposures) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could this be } else if ... {

@jonathanmos
jonathanmos merged commit a152645 into feature/feature-flagging Oct 16, 2025
25 checks passed
@jonathanmos
jonathanmos deleted the jmoskovich/ffl-1113/rum-ff-tracking branch October 16, 2025 16:23
This was referenced Nov 4, 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.

4 participants