Metrics are not logged in the dashboard on first run
Categories
(Data Platform and Tools :: Glean: SDK, defect)
Tracking
(Not tracked)
People
(Reporter: bsurd, Unassigned)
References
Details
Attachments
(2 files)
Metrics telemetry data is not logged properly in the dashboard. Doing any kind of actions that are categorized as metrics according to the metrics.yaml should be logged but are not available.
Metrics are sent if sending the app into the background and opening it up again. It would seem these are only affected for the first run of the app.
Comment 1•5 years ago
|
||
Bogdan, do you have a logcat for this? Can you also provide STR?
Reporter | ||
Comment 2•5 years ago
|
||
STR:
- Install Firefox Preview.
- Start Preview using glean with sendPing metrics.
- Do any action that should be logged in the metrics ping.
Expected:
The action is logged as a metrics ping.
Actual:
The action is not logged
Note:
Metrics are logged after the first start of the app.
Comment 3•5 years ago
|
||
(In reply to Bogdan Surd, QA [:bsurd, NI] from comment #2)
STR:
- Install Firefox Preview.
- Start Preview using glean with sendPing metrics.
Can you please paste the command you're using?
- Do any action that should be logged in the metrics ping.
Can you please mention which action you tried?
Comment 4•5 years ago
|
||
If using the sendPings
command, in the order specified... wouldn't this send the metrics ping immediately on launch of the app and any additional metrics that were recorded after that would just be recorded and not sent until the next metrics ping?
Comment 5•5 years ago
|
||
(In reply to Travis Long from comment #4)
If using the
sendPings
command, in the order specified... wouldn't this send the metrics ping immediately on launch of the app and any additional metrics that were recorded after that would just be recorded and not sent until the next metrics ping?
Exactly, but it depends on whether or not Fenix sets something at startup. In that case, we'd race for it. That's why I asked for more details about the command and STR :)
Comment 6•5 years ago
|
||
Thanks for clarifying!
Reporter | ||
Comment 7•5 years ago
|
||
Can you please paste the command you're using?
Tried with a fresh install, and clearing the app data.
adb shell am start -n org.mozilla.fenix/mozilla.components.service.glean.debug.GleanDebugActivity --ez logPings true --es sendPing metrics --es tagPings bsurd-test-23
Can you please mention which action you tried?
For this scenario I've tried searching. I was expecting a metrics ping to be logged and would have looked for the search_count inside it. For others, I've also tried various bookmarking pings.
Comment 8•5 years ago
•
|
||
Bogdan, would you kindly try the following STR?
STR:
- Install Firefox Preview.
- Start Preview from the phone (do NOT use glean with sendPing metrics).
- Do any action that should be logged in the metrics ping (e.g. perform a search).
- Trigger sending the 'metrics' ping with the following command:
adb shell am start -n org.mozilla.fenix/mozilla.components.service.glean.debug.GleanDebugActivity --ez logPings true --es sendPing metrics --es tagPings bsurd-test-metrics-1
Would you kindly provide a logcat trace in case this doesn't work?
Reporter | ||
Comment 9•5 years ago
|
||
Doing it with these steps worked, but isn't this the same as opening the app a second time? Looking at the device it does do some sort of refresh for the app after sending the command.
This would still mean that no metrics are logged for the first run.
Comment 10•5 years ago
|
||
(In reply to Bogdan Surd, QA [:bsurd, NI] from comment #9)
Doing it with these steps worked, but isn't this the same as opening the app a second time?
No, it uses the currently opened instance. The STR from comment 2 is slightly flawed:
- Install Firefox Preview.
- Start Preview using glean with sendPing metrics.
This will start Firefox but will also send the 'metrics' ping as soon as the application starts, before any interaction takes place (and potentially before any data is recorded). Please note that no ping is generated if no data is recorded.
- Do any action that should be logged in the metrics ping.
At this point we're actually accumulating data in the 'metrics' ping. But we tried to send the ping earlier than this. This data will live in the next ping that gets generated.
Looking at the device it does do some sort of refresh for the app after sending the command.
Can you be more specific about this? It should re-use the application instance that's already open. Are you seeing a different behaviour?
This would still mean that no metrics are logged for the first run.
Metrics are still being recorded, they are not being discarded. Is just that the ping is being sent too early at startup (as requested through adb
). For checking the data, the ping should be triggered after some action that records data is performed.
Reporter | ||
Comment 11•5 years ago
•
|
||
This will start Firefox but will also send the 'metrics' ping as soon as the application starts, before any interaction takes place (and potentially before any data is recorded). Please note that no ping is generated if no data is recorded.
- Do any action that should be logged in the metrics ping.
At this point we're actually accumulating data in the 'metrics' ping. But we tried to send the ping earlier than this. This data will live in the next ping that gets generated.
This would still mean that no metrics are logged for the first run.
Metrics are still being recorded, they are not being discarded. Is just that the ping is being sent too early at startup (as requested through
adb
). For checking the data, the ping should be triggered after some action that records data is performed.
So the metrics ping is sent in a different way than the baseline and event pings? These are logged and appear in the dashboard only after sending the app into the background. It's a bit odd that it works differently from the rest.
Can you be more specific about this? It should re-use the application instance that's already open. Are you seeing a different behaviour?
Please see the attached video.
Reporter | ||
Comment 12•5 years ago
•
|
||
Closing this as Alessio has clarified everything on slack.
Description
•