mozilla / fxa

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

fix(metrics): Add Glean metrics for third party auth start #17151

Closed vbudhram closed 3 months ago

vbudhram commented 3 months ago

Because

This pull request

Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-9810 Closes: https://mozilla-hub.atlassian.net/browse/FXA-9811 Closes: https://mozilla-hub.atlassian.net/browse/FXA-9812

Checklist

Other information (Optional)

I need to add a few tests but I test it with local logging and the events show up as expected

(Glean.core.Pings.Maker) {
  "metrics": {
    "string": {
      "event.name": "google_oauth_login_start",
      "account.user_id_sha256": "",
      "relying_party.oauth_client_id": "",
      "relying_party.service": "",
      "session.device_type": "desktop",
      "session.entrypoint": "",
      "session.flow_id": "5122120888eb117167673bf9c65555bcd785f5ca8d2c0726dc6cb16e053423e4",
      "utm.campaign": "",
      "utm.content": "",
      "utm.medium": "",
      "utm.source": "",
      "utm.term": ""
    }
  },
  "ping_info": {
    "seq": 42,
    "start_time": "2024-06-20T16:14-04:00",
    "end_time": "2024-06-20T16:14-04:00"
  },
  "client_info": {
    "telemetry_sdk_build": "5.0.2",
    "session_id": "c04197f7-64e3-4ba6-a393-08e11e7fa3ec",
    "client_id": "bec66029-5967-4174-9c73-4941555f3b95",
    "session_count": 3,
    "first_run_date": "2024-06-20-04:00",
    "os": "Darwin",
    "os_version": "Unknown",
    "architecture": "Unknown",
    "locale": "en-US",
    "app_build": "Unknown",
    "app_display_version": "0.0.0",
    "app_channel": "development"
  }
}