Implement the "first_run_date" (formerly known as "profile_age") in ping_info
Categories
(Toolkit :: Telemetry, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | affected |
People
(Reporter: Dexter, Assigned: mdroettboom)
References
Details
(Whiteboard: [telemetry:mobilesdk:m5])
Attachments
(4 files)
The baseline ping needs to contain information about how old is the profile sending telemetry.
The old telemetry library, handled it like that, by saving the date it was first run to a file.
We can probably do the same :)
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 1•6 years ago
|
||
Jan-Erik suggests we could use firstInstallTime
, available since API level 9. Sebastian, do you know how reliable that is compared to the way telemetry-library was doing (see comment 0)?
Reporter | ||
Comment 2•6 years ago
|
||
(In reply to Alessio Placitelli [:Dexter] from comment #1)
Jan-Erik suggests we could use
firstInstallTime
, available since API level 9. Sebastian, do you know how reliable that is compared to the way telemetry-library was doing (see comment 0)?
Oh, nevermind, this is "install time", profile age is "age to first run time".
Reporter | ||
Comment 3•6 years ago
|
||
I'm planning on using the Datetime
metric type to power this, so that we're not reinventing a new storage system (since this needs to be a "user" lifetime metric).
*** Question 1 ***
Instead of reporting the profile_age
, should we report the first_run_date
? There was a discussion on IRC about this, and the consensus seemed to be that, since there's no concept of "profile" on mobile, doesn't make much sense to cargo-cult that name.
Moreover, we could use the metric types we support rather than have some other custom made mechanism just for this bit of information. We could use Datetime
with a time_unit=day
resolution and lifetime=user
and be done with it :)
@All + @Chris, @Jan-Erik, did I capture the tone of the discussion correctly? Thoughts?
*** Question 2 (if we're cool with using our metric types) ***
There's one unclear aspect about the spec, though. We're allowing to specify the time_unit
, as we do for Timespan
. In this latter case, when assembling the ping, we're always sending out both the time_unit and the value of the timespan. That makes sense, as we're just reporting a raw number that doesn't make any sense without the accompanying time unit.
In the Datetime
case though, we're always reporting an ISO8601 compliant date string, which will always make sense. The time_unit
specified in the registry files will only affect the rounding of the date, e.g. time_unit=day
will ensure the report string won't contain anything more granular than days, "2018-12-19T00:00-06:00". So I don't think we gain anything by sending the value of time_unit
in the ping, along with the date string. This additional metadata will be available in the probe dictionary, sometime in the future.
@Mike, @Georg, @Frank, @Travis - what do you think?
Comment 4•6 years ago
|
||
👍 on first_run_date
, that's what it is. Make sure to properly document that this is sourced from the user's device time, which tends to be unreliable as we learned (but should be good enough for most of our analysis)
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
I'm :+1: on not sending the time unit with datetimes, just truncating the datetime as specified. The current schema does include the time_unit, so we'll have to take it out, but that shouldn't be a big problem.
Comment 6•6 years ago
|
||
Question 1: first_run_date
is more descriptive and accurate so +1 on that. I'm also all for using our built in metric types for this and DateTime seems like an obvious choice.
Question 2: I don't think a separate time-unit/resolution is meaningful to a DateTime. I very much like the idea of truncating on the desired granularity, such as midnight for day, the top of the hour for hour, etc.
Comment 7•6 years ago
|
||
<Insert basically Jan-Erik's comment, but translated into chuttenglish>
Comment 8•6 years ago
|
||
Can we get first_run_date
from the edge server? That would seriously benefit user retention analysis since we won't have to be concerned about client time.
Also, now that you've said install_date
is available, I think we should include it. I hate to expand requirements but that could be very useful.
re: Question 1: first_run_date
is fine. client_date
could be added but that's just schematic sugar.
re: Question 2: No need to send time_unit
, it will be in the probe-info-service.
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 9•6 years ago
|
||
(In reply to Frank Bertsch [:frank] from comment #8)
Can we get
first_run_date
from the edge server? That would seriously benefit user retention analysis since we won't have to be concerned about client time.
Are you suggesting we don't add anything client side to the ping? How would you check on the edge if the client id was seen for the first time? Or do you mean we should still add this client side and then you would add the same metadata on the edge? (I suspect one could check the submission date/receiving date for pings with sequence == 0).
Also, now that you've said
install_date
is available, I think we should include it. I hate to expand requirements but that could be very useful.
Would you mind filing a bug about this here?
re: Question 1:
first_run_date
is fine.client_date
could be added but that's just schematic sugar.
re: Question 2: No need to sendtime_unit
, it will be in the probe-info-service.
Cool, thanks!
Comment 10•6 years ago
|
||
(In reply to Alessio Placitelli [:Dexter] from comment #9)
(In reply to Frank Bertsch [:frank] from comment #8)
Are you suggesting we don't add anything client side to the ping? How would you check on the edge if the client id was seen for the first time? Or do you mean we should still add this client side and then you would add the same metadata on the edge? (I suspect one could check the submission date/receiving date for pings with sequence == 0).
What I would truly love is the client to have the first_run
date but from the server. It's notoriously difficult to track this information in the pipeline-side, but much simpler on the client (ask, answer, store). We had a previous discussion about using server-time.
One particular reason to use it in this case is if the client-clock is not only skewed, but drifts, N days into the future we can't use the existing skew to tell the previous skew (because it will have drifted even further every day).
Comment 11•6 years ago
|
||
I have feelings about this.
- I think we should at least conduct some preliminary skew analysis of mobile clocks to show that client skew's bad enough that we expect it to matter at the day resolution we're proposing for
first_run_date
. - Making that request is data leakage. I don't know what the process will be for glean-enabled applications, but on Desktop we give the user half an hour to review the Privacy Notice and decide whether or not to disable data upload. We don't talk to the Telemetry servers in the meantime.
Might be me making a mountain of a molehill, though.
Assignee | ||
Comment 12•6 years ago
|
||
Assignee | ||
Comment 13•6 years ago
|
||
Assignee | ||
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
Is this going to replace profileAge
in https://github.com/mozilla-mobile/android-components/blob/master/components/service/glean/docs/pings.md ? If so, can you also open an issue/PR to update that in the documentation? I just need to see the documentation for this change - once you link that, I can fill out the form to finish data review.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 16•6 years ago
|
||
Assignee | ||
Comment 17•6 years ago
|
||
:liuche There was some confusion around where this metric will go: ping_info
(which is in absolutely every ping Glean sends) vs. "the baseline ping" (which is a ping containing metrics that every glean-using product sends). After clarifying, it looks like the plan is to put this on ping_info
, and replace profileAge
as you say. I will update the PR to reflect this and update the docs you linked to as part of that.
Comment 18•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Updated•5 years ago
|
Comment hidden (collapsed) |
Description
•