[glean] SharedPreferences are separate for debug and release builds of sample-glean
Categories
(Toolkit :: Telemetry, enhancement, P3)
Tracking
()
People
(Reporter: mdroettboom, Unassigned)
Details
(Whiteboard: [telemetry:mobilesdk:m7])
In trying to debug an unrelated issue involving SharedPreferences and their effects on subsequent runs, I discovered that since this commit the SharedPreferences of debug and release builds are stored in different locations.
This makes development trickier for us. That alone can probably be remedied with some documentation.
However, this may have implications for Fenix and other users. We should confirm that the SharedPreferences between all the various flavors should not be shared.
Comment 1•6 years ago
|
||
(In reply to Michael Droettboom [:mdroettboom] from comment #0)
In trying to debug an unrelated issue involving SharedPreferences and their effects on subsequent runs, I discovered that since this commit the SharedPreferences of debug and release builds are stored in different locations.
That commit only made that surface, as far as I can tell, right? I've added the debug suffix to the sample-glean to make it behave like Fenix would. As far as I understand, storage is per "application id", and we can't really cross that boundary no matter what.
This makes development trickier for us. That alone can probably be remedied with some documentation.
Did you face a specific problem? But I agree we could make this explicit in the docs!
However, this may have implications for Fenix and other users. We should confirm that the SharedPreferences between all the various flavors should not be shared.
I agree. Maybe it's worth checking how legacy telemetry behaved and double-checking with some Android Components peer to see if that is the expected behaviour?
| Reporter | ||
Comment 2•6 years ago
|
||
The specific problem I ran into is that I ran the sample-app in release mode, which created some data (in this case a client_id). I realized that to debug things I would need to run again in the debugger, but that data was gone. Kind of confusing, and this kind of thing used to work. But all of that is a minor developer issue that really only affects glean developers.
The legacy telemetry library in android-components does basically what we do, though all the SharedPreferences are in a single file rather than per-metric-type (but I don't think that's relevant here).
| Reporter | ||
Comment 3•6 years ago
|
||
:pocmo Just wanted to confirm -- it's ok that telemetry storage isn't shared between flavors of the same app. (I think that would be hard to pull off well, anyway).
Updated•6 years ago
|
Comment 4•6 years ago
|
||
(In reply to Michael Droettboom [:mdroettboom] from comment #3)
:pocmo Just wanted to confirm -- it's ok that telemetry storage isn't shared between flavors of the same app. (I think that would be hard to pull off well, anyway).
I don't think there's any need for sharing this data.
Comment 5•6 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian; :pocmo) from comment #4)
(In reply to Michael Droettboom [:mdroettboom] from comment #3)
:pocmo Just wanted to confirm -- it's ok that telemetry storage isn't shared between flavors of the same app. (I think that would be hard to pull off well, anyway).
I don't think there's any need for sharing this data.
Nice. Thanks Sebastian. I think we can close this up.
Description
•