Add documentation for why GleanDebugActivity pings sent with `sendPings` are missing `duration`
Categories
(Data Platform and Tools :: Glean: SDK, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: travis_, Assigned: travis_)
References
Details
(Whiteboard: [telemetry:mobilesdk:m?])
Attachments
(1 file)
The duration is missing from the pings that are normally sent when going into the background when they are forcibly sent by the GleanDebugActivity
. This is due to the duration being completed in the GleanLifecycleObserver
before the pings are being sent, which doesn't happen when using GleanDebugActivity
to send the pings.
We should just need to close the duration in the GleanDebugActivity
before it calls the sendPingsByName
function.
Assignee | ||
Comment 1•6 years ago
•
|
||
This isn't going to be as straightforward to fix as I first thought. Since the change to Timespans that made them pass in an object to key start and stop with, I figured I could just pass in the instance of GleanLifecycleObserver from Glean.kt into the stopAndSum
function inside of GleanDebugActivity
order to stop and sum the duration. Unfortunately, this doesn't seem to work and just shows up as an error count in the ping rather than the duration.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
I looked a bit into this, and I don't think this, per se, is a bug. I think that we have 2 ways to test things:
- use the debug view to tag pings, then manually trigger pings using the app UI;
- use the debug view to tag and send pings.
The (1) should always produce a ping with all the required fields. However, with (2), we should not really expect app behaviour dependent pings to be there. The duration is collected/stored when the app goes through its normal lifecycle of background/foreground, which is some specific behaviour we should not encode with the debug view.
I think we should really make the documentation very explicit about this, to avoid confusion.
Assignee | ||
Comment 3•6 years ago
|
||
That makes sense to me, I've renamed this bug to reflect adding documentation around expected behavior so we can use it to track that work.
Comment 4•6 years ago
|
||
Travis, any chance you could take this if you have some spare cycles?
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
The related PR was merged, closing this!
Assignee | ||
Updated•6 years ago
|
Description
•