-
Notifications
You must be signed in to change notification settings - Fork 74
[flags] FFL-1113: RUM Evaluation Tracking #2926
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
base: feature/feature-flagging
Are you sure you want to change the base?
[flags] FFL-1113: RUM Evaluation Tracking #2926
Conversation
e904a4b
to
8263dbf
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feature/feature-flagging #2926 +/- ##
============================================================
+ Coverage 70.69% 70.76% +0.08%
============================================================
Files 834 836 +2
Lines 30378 30415 +37
Branches 5131 5136 +5
============================================================
+ Hits 21474 21523 +49
+ Misses 7444 7435 -9
+ Partials 1460 1457 -3
🚀 New features to boost your workflow:
|
3ea51ba
to
2697635
Compare
2697635
to
ba4a606
Compare
86f8838
to
2f7a86c
Compare
2f7a86c
to
82fe14a
Compare
* This is enabled by default. | ||
* @param enabled whether flag evaluation events are logged with RUM. | ||
*/ | ||
fun rumIntegrationEnabled(enabled: Boolean): Builder { |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
} | ||
|
||
/** | ||
* Sets whether evaluation logging via RUM integration is enabled. |
There was a problem hiding this comment.
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 explain it better. It is not clear to me what it is about.
* @param flagKey name of the flag. | ||
* @param value value of the flag. | ||
*/ | ||
data class RumFlagEvaluationMessage( |
There was a problem hiding this comment.
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.
featureSdkCore | ||
.getFeature(FLAGS_FEATURE_NAME) | ||
?.unwrap<FlagsFeature>()?.processor?.processEvent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot inject processor
simply when we create DatadogFlagsClient
? Not sure what is the point of featureSdkCore.getFeature(FLAGS_FEATURE_NAME)?.unwrap<FlagsFeature>()
if it is the same module.
private val rumEvaluationLogger = rumEvaluationLogger ?: run { | ||
val rumFeatureScope = featureSdkCore.getFeature(RUM_FEATURE_NAME) | ||
if (rumFeatureScope != null) { | ||
DefaultRumEvaluationLogger(rumFeatureScope) | ||
} else { | ||
NoOpRumEvaluationLogger() | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we do this at the constructor call site? Otherwise having rumEvaluationLogger
both as constructor argument and also a property is confusing.
testedClient.resolveBooleanValue(fakeFlagKey, fakeDefaultValue) | ||
|
||
// Then | ||
verify(mockRumEvaluationLogger, never()).logEvaluation(any(), any()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify(mockRumEvaluationLogger, never()).logEvaluation(any(), any()) | |
verifyNoInteractions(mockRumEvaluationLogger) |
verify(mockRumEvaluationLogger).logEvaluation( | ||
flagKey = eq(fakeFlagKey), | ||
value = eq(fakeFlagValue) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify(mockRumEvaluationLogger).logEvaluation( | |
flagKey = eq(fakeFlagKey), | |
value = eq(fakeFlagValue) | |
) | |
verify(mockRumEvaluationLogger).logEvaluation( | |
fakeFlagKey, | |
fakeFlagValue | |
) |
What does this PR do?
• Evaluation tracking through RUM
This is controlled by the
rumIntegrationEnabled
flag inFlagsConfiguration
(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)