-
Notifications
You must be signed in to change notification settings - Fork 251
feat(ads-client): add telemetry support #7111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a9944b1 to
ff2d2c3
Compare
623ba56 to
3d6650d
Compare
3d6650d to
690f211
Compare
luc-lisi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved! Wait to merge until the data-review ticket is complete though 👍
Data review:Request for data collection review formAll questions are mandatory. You must receive review from a data steward peer on your responses to these questions before shipping new data collection. 1) What questions will you answer with this data?Is the ads-client component (to be shipped on FF iOS and Android) working reliably in the wild? Specifically:
2) Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements?They will establish baseline quality and performance measures for the new ads-client component. Short-term, Mozilla needs to understand if this component is working as intended as we roll it out on FF mobile. 3) What alternative methods did you consider to answer these questions? Why were they not sufficient?Local testing is about all we have currently. This however does not give us a good view on how it is performing "out in the wild." We could use indirect metrics from our backend server, such as ad requests counts, click counts, or request counts to indirectly infer whether the ads-client is working correctly on the client. However it would not help us identify where failure points were if we suspected crashes were occurring. 4) Can current instrumentation answer these questions?No. At best FF iOS or Android could build some instrumentation themselves to determine if the ads-client failed, but it would not have insight into anything past the UniFFI boundary making it considerably less useful for quality monitoring. 5) List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories on the Mozilla wiki.
6) How long will this data be collected? Choose one of the following:
7) What populations will you measure?
All.
All.
All. This component will ship with Firefox iOS and Android. 8) If this data collection is default on, what is the opt-out mechanism for users?This is by default on. Disabling all reporting via 9) Please provide a general description of how you will analyze this data.We'll make a "ads-client quality metrics" dashboard to monitor the datapoints described above. This will only be for engineers on the ads-client team to validate the component is working correctly, and establish baselines for what we consider healthy "normal operation metrics." 10) Where do you intend to share the results of your analysis?The results will be shared internally within the ads-engineering team responsible for the ads-client. We do not plan to distribute or share analyses to anyone else. 11) Is there a third-party tool (i.e. not Telemetry) that you are proposing to use for this data collection?Nope! |
data-review+
Yes, the usual Glean data dictionary for iOS and android, https://dictionary.telemetry.mozilla.org.
Yes, the existing
Yes, the team will monitor (emails currently being revised in metrics.yaml).
Category 2, interaction data.
Default-on.
No.
Yes.
No. |
9563f4d to
c6ab94b
Compare
c6ab94b to
762dfae
Compare
Telemetry Architecture
Core Telemetry Trait
A generic
Telemetry<A>trait at the core/std layer:record(&self, event: &A)methodSuper Traits for Complex Components
Higher-level traits compose multiple telemetry types:
MARSTelemetry: RequiresTelemetry<CacheOutcome>+Telemetry<serde_json::Error>AdsTelemetry: ComposesMARSTelemetry+ specific error types (RequestAdsError,RecordClickError, etc.) +ClientOperationEventThis provides granular control without coupling modules to specific implementations.
FFI Layer: Platform-Specific Implementations
The
MozAdsTelemetrytrait is exposed via UniFFI for iOS/Android:MozAdsClientConfigMozAdsTelemetryWrapperbridges FFI trait to core telemetry traitsBenefits
This keeps the core clean and flexible while enabling platform-specific telemetry integration.
Pull Request checklist
[ci full]to the PR title.