Feature flagging [WIP]#2879
Conversation
f2f9e2b to
b0d15ee
Compare
typotter
left a comment
There was a problem hiding this comment.
This is off to a great start and sets us up really well for iterating into all the finer, detailed parts.
| @@ -0,0 +1,5 @@ | |||
| # Datadog Feature Flags SDK for Android | |||
|
|
|||
| See the dedicated [Datadog Feature Flags documentation][1] to learn how to monitor and send feature flags in your Android or Android TV application to Datadog. | |||
There was a problem hiding this comment.
We also have this:
https://docs.datadoghq.com/getting_started/feature_flags/
The RUM link is more for tracking via the already-existing RUM feature flag tracking ability. Our getting started docs focus on configuring and sending the flags.
| ) : StoreManager { | ||
| private val featureFlagState = AtomicReference<Map<String, PrecomputedFlag>>(emptyMap()) | ||
|
|
||
| override fun getBooleanValue(key: String, defaultValue: Boolean): Boolean { |
There was a problem hiding this comment.
I think the most useful comment I can give this early would be to refactor the StoreManager to return a PrecomputedFlag or null and move selecting the variationValue up to the FlagProvider level, where we'd also have the details methods like resolveBooleanDetails(key, default). Hoisting up the whole PrecomputedFlag` gives us the all the data we need to create an evaluation reason for integration with open feature.
| .post(body) | ||
| .build() | ||
| return try { | ||
| callFactory.newCall(request).execute().use { response -> |
There was a problem hiding this comment.
looks like okhttp3 has a pretty slick Interceptor pattern to control retries so we can get retryable status codes, timing, and exponential backoff pretty easily
| internal class PrecomputeMapper( | ||
| private val internalLogger: InternalLogger | ||
| ) { | ||
| internal fun map(rawJson: String): Map<String, PrecomputedFlag> { |
There was a problem hiding this comment.
At EPPO, we ran into all kinds of headaches with managing JSON decoding. Granted, we had a core library powering both server and android libraries and the datastructure was much more complex than the Precomputed Flags we're working with here. I like the mapper. It's explicit and doesn't rely on anything beyond json.org
typotter
left a comment
There was a problem hiding this comment.
approving for feature branch dev
What does this PR do?
Please ignore this PR for now - this is a WIP for feature flags.
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)