-
Notifications
You must be signed in to change notification settings - Fork 608
Add first-open time to Remote Config fetch request. #3653
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
Conversation
@@ -78,4 +78,6 @@ dependencies { | |||
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.25.0' | |||
androidTestImplementation 'junit:junit:4.12' | |||
androidTestImplementation "org.skyscreamer:jsonassert:1.5.0" | |||
|
|||
api 'joda-time:joda-time:2.10.14' |
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.
This is a pretty heavy dependency, especially given that you don't seem to do any arithmetic on it but just rely on its toString() method, I suggest to use the long directly and use SimpleDateFormat to convert it to an iso string.
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.
Removed the dependency and replaced it with SimpleDataFormat. Thanks, I definitely struggled a bit with this and was looking for inputs!
Coverage Report 1Affected Products
Test Logs
Notes |
Size Report 1Affected Products
Test Logs
Notes |
@@ -79,6 +80,9 @@ public class ConfigFetchHandler { | |||
*/ | |||
@VisibleForTesting static final int HTTP_TOO_MANY_REQUESTS = 429; | |||
|
|||
/** First Open time key in GA user-properties. */ |
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.
Might add to the comment that this is a reserved property set by GA (I think that's the case?) per https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event
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.
Yes, it is an internal property. Updated the comment to say that it's collected by GA as part of of the predefined "user-dimensions". I called it "user-dimensions" following the recent GA documentation (https://support.google.com/firebase/answer/9268042?hl=en&ref_topic=6317484) but on second thought, maybe something simpler is better: "internal user-property automatically collected by GA" ?
@@ -174,6 +177,7 @@ FetchResponse fetch( | |||
Map<String, String> analyticsUserProperties, | |||
String lastFetchETag, | |||
Map<String, String> customHeaders, | |||
Instant firstOpenTime, |
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.
Thinking aloud: it doesn't make sense to merge this in with the other analyticsUserProperties
since we want to send it as its own request param.
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.
Yes, and the reason we want to send it in its own request param is because analyticsUserProperties in fetch traditionally contains custom user-defined properties only. And we want to keep, and highlight, that distinction. It also lets us explicitly call out the information that we are sending up to the server.
… as per review comments.
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.
One small comment about a comment. Looks good to me!
@@ -79,6 +79,12 @@ public class ConfigFetchHandler { | |||
*/ | |||
@VisibleForTesting static final int HTTP_TOO_MANY_REQUESTS = 429; | |||
|
|||
/** | |||
* First-open-time key name in GA user-properties. First-open time is a predefined user-dimension |
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.
Small nit, looks like you have "first-open time" for the most part in the comments so I'd make it consistent here, too.
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.
Done. :)
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.
LGTM
No description provided.