Commit f52ec2ac authored by Chris H-C's avatar Chris H-C
Browse files

Bug 1660887 - Measure user inactivity to evaluate FOG lifecycle triggers. r=janerik, a=RyanVM

Differential Revision: https://phabricator.services.mozilla.com/D89023
parent 2f67264a
......@@ -15566,6 +15566,19 @@
"description": "Seconds between `user-interaction-active` and `user-interaction-inactive`. For use in evaluating baseline engagement for Project FOG.",
"releaseChannelCollection": "opt-out"
},
"FOG_EVAL_USER_INACTIVE_S" : {
"products": ["firefox"],
"record_in_processes": ["main"],
"alert_emails": ["chutten@mozilla.com"],
"expires_in_version": "85",
"kind": "exponential",
"keyed": false,
"high": 7200,
"n_buckets": 50,
"bug_numbers": [1660887],
"description": "Seconds between `user-interaction-inactive` and `user-interaction-active`. For use in evaluating baseline engagement for Project FOG.",
"releaseChannelCollection": "opt-out"
},
"FOG_EVAL_WINDOW_RAISED_S" : {
"products": ["firefox"],
"record_in_processes": ["main"],
......
......@@ -5406,6 +5406,24 @@ fog.eval:
record_in_processes:
- 'main'
user_inactive_error:
bug_numbers:
- 1660887
description: >
How many Telemetry stopwatch errors did we have while trying to measure user inactivity?
These could be attempts to start a started timer or finish an unstarted timer or so forth.
See Stopwatch::Start and Stopwatch::Finish for details.
For use in evaluating baseline engagement for Project FOG.
expires: '85'
kind: 'uint'
notification_emails:
- 'chutten@mozilla.com'
release_channel_collection: 'opt-out'
products:
- 'firefox'
record_in_processes:
- 'main'
window_raised_error:
bug_numbers:
- 1647876
......
......@@ -1186,16 +1186,35 @@ var Impl = {
// FOG User Engagement Evaluation.
Telemetry.scalarSet("fog.eval.user_active", aUserActive);
let error = false;
let inactiveError = false;
if (aUserActive) {
// The first change is from inactive to active, so this'll always
// error unless we skip that one.
if (this._fogFirstActivityChange === false) {
inactiveError = !TelemetryStopwatch.finish(
"FOG_EVAL_USER_INACTIVE_S"
);
}
error = !TelemetryStopwatch.start("FOG_EVAL_USER_ACTIVE_S", null, {
inSeconds: true,
});
} else {
inactiveError = !TelemetryStopwatch.start(
"FOG_EVAL_USER_INACTIVE_S",
null,
{
inSeconds: true,
}
);
error = !TelemetryStopwatch.finish("FOG_EVAL_USER_ACTIVE_S");
}
if (error) {
Telemetry.scalarAdd("fog.eval.user_active_error", 1);
}
if (inactiveError) {
Telemetry.scalarAdd("fog.eval.user_inactive_error", 1);
}
this._fogFirstActivityChange = false;
}
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment