Log analytics event when Entity create/update fails to apply#7238
Log analytics event when Entity create/update fails to apply#7238grzesiek2010 wants to merge 8 commits into
Conversation
seadowg
left a comment
There was a problem hiding this comment.
With these analytics in place, I’m wondering whether we still need to log invalid entities to a file that is only available in debug builds
Could the DebugLogger implementation also log analytics? I think that'd be useful to limit noise in the implementations themselves.
I'm hesitant about this because DebugLogger is active in debug builds only, while we need these analytics in production. Combining them would be misleading. Are you even using this logger? |
Good point. We could have the logger always active and only log to a file in debug?
We were initially planning to expand it (and access to it) over time and possible present UI for it so that form designers can use it or the log can be sent to us to help resolve problems. |
679ed8d to
2226eff
Compare
2226eff to
ce219de
Compare
ce219de to
e99abe2
Compare
We can do that. I've moved the ID validation to I remember you weren't a fan of this change when it was introduced some time ago, but it makes more sense now, especially after introducing the |
| interface DebugLogger { | ||
| fun log(tag: String, message: String) | ||
|
|
||
| fun logWithAnalytics(tag: String, message: String, analyticsEvent: String, analyticsKey: String) |
There was a problem hiding this comment.
I feel like adding an explicit analytics method here muddies the encapsulation. Maybe we should move DebugLogger in to the entities module (it could be an EntitiesDebugLogger) and have it log an "event" enum or sealed type, and then it can do the work convert that into a line in a log file and an analytics call?
1bc5afc to
fba6775
Compare
Closes #7230
Why is this the best possible solution? Were any other approaches considered?
I’ve added the new analytics we discussed earlier. With these analytics in place, I’m wondering whether we still need to log invalid entities to a file that is only available in debug builds (introduced in d3cb260).
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
It doesn't require testing.
Do we need any specific form for testing your changes? If so, please attach one.
No.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No.
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest(or./gradlew testLab) and confirmed all checks still passDateFormatsTest