mozilla / fxa

Monorepo for Mozilla Accounts (formerly Firefox Accounts)
https://mozilla.github.io/ecosystem-platform/
Mozilla Public License 2.0
602 stars 210 forks source link

include client_id when we log the `oauth.token.created` event #6290

Closed jaredhirsch closed 4 years ago

jaredhirsch commented 4 years ago

Description

Right now, we're not gathering quite enough data with the AET pings to understand if AET is working properly across RPs.

We should include the client_id (and, if it's easy*, the human-readable client name) in the oauth.token.created event logged by auth-server.

Once that's done, we should update bug 1653654 to let the data eng folks know that they should modify their ETL code to look for the client info.

Background:

The AET identifier (ecosystemAnonId) is logged as part of the oauth.token.created event. This event currently has the shape { ecosystemAnonId, uid, grantType }. After this event is logged, it's transported by Stackdriver to a BigQuery table (along with all our server logs). The data team maintains a bigquery-ETL job that fishes out just the AET identifier and forwards it to a separate AET BigQuery project (see bug 1653654 for details on the data eng code).

* I'm not sure the readable versions of client names are easily accessible from auth-server, so we could instead give the list of client_ids & client names to data ops, and they can make that list available to the bigquery-ETL code.

┆Issue is synchronized with this Jira Task ┆Issue Number: FXA-2474

jklukas commented 4 years ago

To be clear, when you say client_id here, you are referring to the oauth client ID and not a telemetry client_id (which we would definitely not want to put alongside any AET identifiers)?

rfk commented 4 years ago

when you say client_id here, you are referring to the oauth client ID and not a telemetry client_id

Correct, this is the OAuth client_id; it's an unfortunate naming conflict here for sure :-/