mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1929832 - Rename to usage-reporting
ping and remove the info fields r=loines,android-reviewers,pollymce
This is done for Desktop, Fenix and Focus all at once Differential Revision: https://phabricator.services.mozilla.com/D229785
This commit is contained in:
parent
13aa437ae7
commit
71e8385984
@ -42,7 +42,7 @@ browser.engagement:
|
||||
send_in_pings:
|
||||
- baseline
|
||||
- metrics
|
||||
- dau-reporting
|
||||
- usage-reporting
|
||||
telemetry_mirror: BROWSER_ENGAGEMENT_ACTIVE_TICKS
|
||||
no_lint:
|
||||
- BASELINE_PING
|
||||
@ -75,7 +75,7 @@ browser.engagement:
|
||||
send_in_pings:
|
||||
- baseline
|
||||
- metrics
|
||||
- dau-reporting
|
||||
- usage-reporting
|
||||
no_lint:
|
||||
- BASELINE_PING
|
||||
telemetry_mirror: BROWSER_ENGAGEMENT_TOTAL_URI_COUNT_NORMAL_AND_PRIVATE_MODE
|
||||
|
@ -2114,6 +2114,7 @@ metrics:
|
||||
send_in_pings:
|
||||
- metrics
|
||||
- baseline
|
||||
- usage-reporting
|
||||
bugs:
|
||||
- https://github.com/mozilla-mobile/fenix/issues/16075
|
||||
data_reviews:
|
||||
|
@ -131,3 +131,23 @@ dau-reporting:
|
||||
active: |
|
||||
The ping was submitted when the application became active again,
|
||||
which includes when the application starts.
|
||||
|
||||
usage-reporting:
|
||||
description: |
|
||||
Minimal ping to measure the usage frequency of Firefox.
|
||||
Sent on the baseline schedule.
|
||||
include_client_id: false
|
||||
send_if_empty: true
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1921440
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1929832
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1921440
|
||||
notification_emails:
|
||||
- glean-team@mozilla.com
|
||||
- jrediger@mozilla.com
|
||||
- loines@mozilla.com
|
||||
metadata:
|
||||
include_info_sections: false
|
||||
ping_schedule:
|
||||
- baseline
|
||||
|
@ -212,7 +212,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
||||
delayPingLifetimeIo = FxNimbus.features.glean.value().delayPingLifetimeIo,
|
||||
pingLifetimeThreshold = FxNimbus.features.glean.value().pingLifetimeThreshold,
|
||||
pingLifetimeMaxTime = FxNimbus.features.glean.value().pingLifetimeMaxTime,
|
||||
pingSchedule = mapOf("baseline" to listOf("dau-reporting")),
|
||||
pingSchedule = mapOf("baseline" to listOf("usage-reporting")),
|
||||
)
|
||||
|
||||
// Set the metric configuration from Nimbus.
|
||||
|
@ -56,3 +56,22 @@ dau-reporting:
|
||||
active: |
|
||||
The ping was submitted when the application became active again,
|
||||
which includes when the application starts.
|
||||
|
||||
usage-reporting:
|
||||
description: |
|
||||
Minimal ping to measure the usage frequency of Firefox.
|
||||
Sent on the baseline schedule.
|
||||
include_client_id: false
|
||||
send_if_empty: true
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1921440
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1921440
|
||||
notification_emails:
|
||||
- glean-team@mozilla.com
|
||||
- jrediger@mozilla.com
|
||||
- loines@mozilla.com
|
||||
metadata:
|
||||
include_info_sections: false
|
||||
ping_schedule:
|
||||
- baseline
|
||||
|
@ -112,7 +112,7 @@ class GleanMetricsService(context: Context) : MetricsService {
|
||||
client = lazy(LazyThreadSafetyMode.NONE) { components.client },
|
||||
usePrivateRequest = true,
|
||||
),
|
||||
pingSchedule = mapOf("baseline" to listOf("dau-reporting")),
|
||||
pingSchedule = mapOf("baseline" to listOf("usage-reporting")),
|
||||
),
|
||||
buildInfo = GleanBuildInfo.buildInfo,
|
||||
)
|
||||
|
@ -23,6 +23,7 @@ dau-reporting:
|
||||
send_if_empty: true
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1921440
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1929832
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1921440
|
||||
notification_emails:
|
||||
|
@ -105,7 +105,7 @@ usage:
|
||||
- loines@mozilla.com
|
||||
expires: never
|
||||
send_in_pings:
|
||||
- dau-reporting
|
||||
- usage-reporting
|
||||
|
||||
browser.engagement:
|
||||
session_time_including_suspend:
|
||||
|
@ -4,3 +4,23 @@
|
||||
|
||||
---
|
||||
$schema: moz://mozilla.org/schemas/glean/pings/2-0-0
|
||||
|
||||
usage-reporting:
|
||||
description: |
|
||||
Minimal ping to measure the usage frequency of Firefox.
|
||||
Sent on the baseline schedule.
|
||||
include_client_id: false
|
||||
send_if_empty: true
|
||||
bugs:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1921440
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1929832
|
||||
data_reviews:
|
||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1921440
|
||||
notification_emails:
|
||||
- glean-team@mozilla.com
|
||||
- jrediger@mozilla.com
|
||||
- loines@mozilla.com
|
||||
metadata:
|
||||
include_info_sections: false
|
||||
ping_schedule:
|
||||
- baseline
|
||||
|
@ -8,16 +8,16 @@ from telemetry_harness.fog_ping_filters import (
|
||||
)
|
||||
from telemetry_harness.fog_testcase import FOGTestCase
|
||||
|
||||
FOG_DAU_REPORTING = FOGDocTypePingFilter("dau-reporting")
|
||||
FOG_DAU_REPORTING = FOGDocTypePingFilter("usage-reporting")
|
||||
CANARY_USAGE_PROFILE_ID = "beefbeef-beef-beef-beef-beeefbeefbee"
|
||||
|
||||
|
||||
class TestDauReporting(FOGTestCase):
|
||||
"""Tests for FOG dau-reporting ping and dau-id cycling."""
|
||||
"""Tests for FOG usage-reporting ping and dau-id cycling."""
|
||||
|
||||
def test_dau_reporting(self):
|
||||
"""
|
||||
Test the "dau-reporting" ping behaviour and dau-id cycling when disabling telemetry.
|
||||
Test the "usage-reporting" ping behaviour and dau-id cycling when disabling telemetry.
|
||||
"""
|
||||
|
||||
ping1 = self.wait_for_ping(
|
||||
@ -26,10 +26,8 @@ class TestDauReporting(FOGTestCase):
|
||||
ping_server=self.fog_ping_server,
|
||||
)
|
||||
|
||||
self.assertIn("ping_info", ping1["payload"])
|
||||
self.assertIn("client_info", ping1["payload"])
|
||||
|
||||
self.assertNotIn("client_id", ping1["payload"]["client_info"])
|
||||
self.assertNotIn("ping_info", ping1["payload"])
|
||||
self.assertNotIn("client_info", ping1["payload"])
|
||||
|
||||
metrics = ping1["payload"]["metrics"]
|
||||
self.assertNotIn("legacy.telemetry.client_id", metrics["uuid"])
|
||||
|
@ -16,22 +16,35 @@ class BaselineRidealongFilter:
|
||||
return doc_type in self.expected_pings
|
||||
|
||||
|
||||
DauReportFilter = BaselineRidealongFilter("dau-reporting")
|
||||
DauReportFilter = BaselineRidealongFilter("usage-reporting")
|
||||
|
||||
|
||||
class TestClientActivity(FOGTestCase):
|
||||
"""
|
||||
Tests for client activity and FOG's scheduling of the "baseline" ping.
|
||||
For every `baseline` ping we also expect a `dau-reporting` ping.
|
||||
For every `baseline` ping we also expect a `usage-reporting` ping.
|
||||
"""
|
||||
|
||||
def test_user_activity(self):
|
||||
# We might still get those pings in an unexpected order.
|
||||
# Let's check we get both.
|
||||
expected_pings = ["baseline", "usage-reporting"]
|
||||
|
||||
# First test that restarting the browser sends a "active" ping
|
||||
[ping0, ping1] = self.wait_for_pings(
|
||||
self.restart_browser, DauReportFilter, 2, ping_server=self.fog_ping_server
|
||||
)
|
||||
self.assertEqual("active", ping0["payload"]["ping_info"]["reason"])
|
||||
self.assertEqual("active", ping1["payload"]["ping_info"]["reason"])
|
||||
received_pings = sorted(
|
||||
[
|
||||
ping0["request_url"]["doc_type"],
|
||||
ping1["request_url"]["doc_type"],
|
||||
]
|
||||
)
|
||||
self.assertEqual(expected_pings, received_pings)
|
||||
if ping0["request_url"]["doc_type"] == "baseline":
|
||||
self.assertEqual("active", ping0["payload"]["ping_info"]["reason"])
|
||||
if ping1["request_url"]["doc_type"] == "baseline":
|
||||
self.assertEqual("active", ping1["payload"]["ping_info"]["reason"])
|
||||
|
||||
with self.marionette.using_context(self.marionette.CONTEXT_CHROME):
|
||||
zero_prefs_script = """\
|
||||
@ -61,10 +74,6 @@ class TestClientActivity(FOGTestCase):
|
||||
ping_server=self.fog_ping_server,
|
||||
)
|
||||
|
||||
# We might still get those pings in an unexpected order.
|
||||
# Let's check we get both.
|
||||
expected_pings = ["baseline", "dau-reporting"]
|
||||
|
||||
received_pings = sorted(
|
||||
[
|
||||
ping2["request_url"]["doc_type"],
|
||||
@ -72,8 +81,10 @@ class TestClientActivity(FOGTestCase):
|
||||
]
|
||||
)
|
||||
self.assertEqual(expected_pings, received_pings)
|
||||
self.assertEqual("active", ping2["payload"]["ping_info"]["reason"])
|
||||
self.assertEqual("active", ping3["payload"]["ping_info"]["reason"])
|
||||
if ping2["request_url"]["doc_type"] == "baseline":
|
||||
self.assertEqual("active", ping2["payload"]["ping_info"]["reason"])
|
||||
if ping3["request_url"]["doc_type"] == "baseline":
|
||||
self.assertEqual("active", ping3["payload"]["ping_info"]["reason"])
|
||||
|
||||
received_pings = sorted(
|
||||
[
|
||||
@ -82,5 +93,7 @@ class TestClientActivity(FOGTestCase):
|
||||
]
|
||||
)
|
||||
self.assertEqual(expected_pings, received_pings)
|
||||
self.assertEqual("inactive", ping4["payload"]["ping_info"]["reason"])
|
||||
self.assertEqual("inactive", ping5["payload"]["ping_info"]["reason"])
|
||||
if ping4["request_url"]["doc_type"] == "baseline":
|
||||
self.assertEqual("inactive", ping4["payload"]["ping_info"]["reason"])
|
||||
if ping5["request_url"]["doc_type"] == "baseline":
|
||||
self.assertEqual("inactive", ping5["payload"]["ping_info"]["reason"])
|
||||
|
Loading…
Reference in New Issue
Block a user