[Telemetry] The information of deviceID & deviceinfo.update_channel are incorrect in App usage metrics

RESOLVED FIXED in Firefox OS v2.2

Status

Firefox OS
Gaia::System
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: gchang, Assigned: marshall_law)

Tracking

unspecified
2.2 S7 (6mar)
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:2.2+, b2g-v2.2 fixed, b2g-master fixed)

Details

(Whiteboard: [priority][ft:media])

Attachments

(2 attachments)

(Reporter)

Description

4 years ago
### Steps:
1. - (Optional) Set the retry interval to 30 sec in gaia/apps/system/js/app_usage_metrics.js
2. Change the update channel to "aurora"
3. Create a fake server to receive the data sent by device
------------------------------------------------------------------
Below is one of the data sent by device

{
    "apps": {
        "app://communications.gaiamobile.org/manifest.webapp": {
            "activities": {},
            "installs": 0,
            "invocations": 1,
            "uninstalls": 0,
            "usageTime": 372720
        },
        "app://verticalhome.gaiamobile.org/manifest.webapp": {
            "activities": {},
            "installs": 0,
            "invocations": 1,
            "uninstalls": 0,
            "usageTime": 10
        }
    },
    "deviceID": "9uhoy3oc",
    "deviceinfo": {
        "developer.menu.enabled": true,
        "deviceinfo.platform_build_id": "20140917160201",
        "deviceinfo.platform_version": "34.0a2",
        "deviceinfo.update_channel": "unknown"
    },
    "locale": "en-US",
    "screen": {
        "devicePixelRatio": 1.5,
        "height": 569,
        "width": 320
    },
    "start": 1411373904420,
    "stop": 1411374106270
}
------------------------------------------------------------------
$ adb devices
List of devices attached 
3739ced3	device
------------------------------------------------------------------

### Expected:
1. The device id should be the same as the result of "adb devices"
2. The update channel should be changed to "aurora"

### Actual:
1. The device id is not the same as "adb devices"
2. The update channel is still "unknown"

### Reproduce rate
always

### Version:
Device    flame
Gaia-Rev        379e68fe729a684fa2fcddb30ea1e65508db73e1
Gecko-Rev       https://hg.mozilla.org/releases/mozilla-aurora/rev/7cb113c3ce0c
Build-ID        20140917160201
Version         34.0a2
(Reporter)

Comment 1

4 years ago
[Blocking Requested - why for this release]:
blocking-b2g: --- → 2.1?
Marshall, 

can you please help investigate this given the metrics reported are not correct.
blocking-b2g: 2.1? → 2.1+
Flags: needinfo?(marshall)
(Assignee)

Comment 3

4 years ago
Device ID is randomly generated, and not expected to be the same as shown by |adb devices|. See more info at the app usage metrics wiki here:
https://wiki.mozilla.org/FirefoxOS/Metrics/App_Usage

How are you changing the update channel? Are you setting it at build time, or through the Developer menu in Settings?
Flags: needinfo?(marshall) → needinfo?(gchang)
(Reporter)

Comment 4

4 years ago
No, I am not setting it at build time. 
You can create a file "update.js and add following 
"add a pref("app.update.channel", "nightly"); in update.js
Then, put it in /system/b2g/defaults/pref
This can change the update channel.
Flags: needinfo?(gchang)
Hi Bhavana and Marshall,

what's the status of this bug, are we actively working on it? It's reproducible? Do we have a owner for this bug?

Also moving to the system fe component.
Flags: needinfo?(marshall)
Flags: needinfo?(bbajaj)
Component: Gaia → Gaia::System

Comment 6

4 years ago
[Blocking Requested - why for this release]:

Bhavana,

What decisions are we making on the metrics data based on update channel value being right. As I understand from Marshall this issue has been there since the first phase implementation. 

We have a bunch of other blockers and are trying to prioritize within those. We could look into this after other serious blockers are fixed. Setting priority whiteboard flag

Thanks
Hema
blocking-b2g: 2.1+ → 2.1?
Whiteboard: [priority]
Whiteboard: [priority] → [priority][ft:media]
(In reply to Hema Koka [:hema] from comment #6)
> [Blocking Requested - why for this release]:
> 
> Bhavana,
> 
> What decisions are we making on the metrics data based on update channel
> value being right. As I understand from Marshall this issue has been there
> since the first phase implementation. 
> 
> We have a bunch of other blockers and are trying to prioritize within those.
> We could look into this after other serious blockers are fixed. Setting
> priority whiteboard flag
> 
> Thanks
> Hema

Ravi mentioned this is needed, hence the blocking. I am happy to minus it as long as the product team is getting the expected data. Ravi, can you confirm here?
Flags: needinfo?(bbajaj) → needinfo?(rdandu)

Comment 8

4 years ago
This particular metric "update_channel" is not normally changed by end user (unless very advanced user), so as long as metrics is picking up the build time value, this bug should not block release.

Bhavana, please mark it as non-blocking.
Flags: needinfo?(rdandu)

Updated

4 years ago
blocking-b2g: 2.1? → -
Hi Marshall,

I'm still seeing "deviceinfo.update_channel": "unknown" in 2.2's app usage ping. 

the FTU ping is using "app.update.channel": "default" instead of "deviceinfo.update_channel", is this a bug or a intended behaviour?
(Assignee)

Comment 10

3 years ago
It should probably be the same as FTU ping, let me take a look.. thanks for the heads up!
Flags: needinfo?(marshall)
Created attachment 8570085 [details] [review]
[gaia] marshall:bug1070875_aumUpdateChannel > mozilla-b2g:master
(Assignee)

Updated

3 years ago
blocking-b2g: - → 2.2?
(Assignee)

Comment 12

3 years ago
Comment on attachment 8570085 [details] [review]
[gaia] marshall:bug1070875_aumUpdateChannel > mozilla-b2g:master

This updates AUM to use the setting 'app.update.channel' which is copied over from the Gecko pref of the same name. For whatever reason, 'deviceinfo.update_channel' didn't actually reflect the same update channel as 'app.update.channel' that the FTU ping uses, so this patch makes them consistent.

Long term I'd like to pull all of the 'deviceinfo' and other device data queries out into the shared telemetry module, but that is a big change. I'd like to ensure we're getting the proper update channel for v2.2 devices..
Attachment #8570085 - Flags: review?(dflanagan)
Comment on attachment 8570085 [details] [review]
[gaia] marshall:bug1070875_aumUpdateChannel > mozilla-b2g:master

Looks good to me.
Attachment #8570085 - Flags: review?(dflanagan) → review+
(Assignee)

Comment 14

3 years ago
master - https://github.com/mozilla-b2g/gaia/commit/e5e2dc916d04561b12c88414df67fcbb468fd2a2
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Created attachment 8573297 [details] [review]
[gaia] marshall:bug1070875_aumUpdateChannel_v2.2 > mozilla-b2g:v2.2
(Assignee)

Comment 16

3 years ago
Comment on attachment 8573297 [details] [review]
[gaia] marshall:bug1070875_aumUpdateChannel_v2.2 > mozilla-b2g:v2.2

This fixes update channel reporting for App Usage Metrics
[Bug caused by] (feature/regressing bug #): n/a
[User impact] if declined: we won't collect proper update channels in v2.2 usage metrics
[Testing completed]: tested locally on Flame
[Risk to taking this patch] (and alternatives if risky): low, this just changes the name of the update channel setting
[String changes made]: none
Attachment #8573297 - Flags: approval-gaia-v2.2?(bbajaj)
blocking-b2g: 2.2? → 2.2+

Updated

3 years ago
Attachment #8573297 - Flags: approval-gaia-v2.2?(bbajaj) → approval-gaia-v2.2+
v2.2: https://github.com/mozilla-b2g/gaia/commit/dc64d277e0e0ebcba1c3199482adbdfa27654bf7
Assignee: nobody → marshall
status-b2g-v2.2: --- → fixed
status-b2g-master: --- → fixed
Target Milestone: --- → 2.2 S7 (6mar)
You need to log in before you can comment on or make changes to this bug.