[Metrics] App names in AppUsage debug log are broken

RESOLVED FIXED

Status

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

People

(Reporter: shinglyu, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
*** Description

  The app names become [object Object] in the adb log.

*** Steps to Reproduce

  1. Set AUM.DEBUG=true in apps/system/js/app_usage_metrics.js
  2. Flash gaia
  3. Run adb logcat | grep AppUsage with USB connected to the phone
  4. Open and then close several apps

*** Expected Results

  There should be log messages like
    [APP NAME] ran for [X sec]

*** Actual Results

  The debug log looks like this
    I/GeckoConsole(  961 ): Content JS LOG: [AppUsage] [object DOMApplication] uninstalled 
    I/GeckoConsole(  961 ): Content JS LOG: [AppUsage] [object Object] ran for 14

*** Other Notes


*** Reproduction Frequency
100%

*** Build
  Gaia-Rev        8e98fe665f3821d10d4d982cbb14cbe5b94d0be5
  Gecko-Rev       https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/62c80c92b39e
  Build-ID        20150215162503
  Version         37.0a2
  Device-Name     flame
  FW-Release      4.4.2
  FW-Incremental  65
  FW-Date         Mon Dec 15 18:51:29 CST 2014
  Bootloader      L1TC000118D0
Flags: needinfo?(marshall)
Ah, good catch! Whipping up a patch now.
Flags: needinfo?(marshall)
Created attachment 8569918 [details] [review]
[gaia] marshall:bug1137064_debugAppURLs > mozilla-b2g:master
It looks like the issue was only with the debugging statements themselves, not the actual JSON payload.

Shing, can you give my new pull request a whirl? Looks to be fixed locally for me..
Flags: needinfo?(slyu)
(Reporter)

Comment 4

3 years ago
I'll try it ASAP. Need to finish some Metrics testing today. (Keeping the NI as a reminder)
(Reporter)

Comment 5

3 years ago
Verified.

Examples:

I/GeckoConsole( 1127): Content JS LOG: [AppUsage] app://verticalhome.gaiamobile.org/manifest.webapp ran for 2 
I/GeckoConsole( 1127): Content JS LOG: [AppUsage] https://www.etsy.com/firefox_etsy_manifest.webapp installed 
I/GeckoConsole( 1127): Content JS LOG: [AppUsage] https://www.etsy.com/firefox_etsy_manifest.webapp uninstalled 
I/GeckoConsole( 1127): Content JS LOG: [AppUsage] app://sms.gaiamobile.org/manifest.webapp invoked activity app://video.gaiamobile.org/index.html#pick
Flags: needinfo?(slyu)
master - https://github.com/mozilla-b2g/gaia/commit/4a0f8bc058c27b7900f1727b13106147179f29ca
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Shing, do you want to land this in v2.2 also?
Flags: needinfo?(slyu)
(Reporter)

Comment 8

3 years ago
Sure, it would be very helpful for testing. (And I assume the risk is low.) Thanks!
Flags: needinfo?(slyu)
You need to log in before you can comment on or make changes to this bug.