-
Notifications
You must be signed in to change notification settings - Fork 123
[DENG-9376] Publish DOH adoption and usage rates #8238
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
Open
+321
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
BenWu
reviewed
Oct 16, 2025
sql/moz-fx-data-shared-prod/telemetry_derived/doh_adoption_rate_v1/schema.yaml
Show resolved
Hide resolved
Comment on lines
3
to
26
SELECT | ||
DATE(submission_timestamp) AS submission_date, | ||
'doh.evaluate_v2_heuristics' AS metric, | ||
"value" AS key, | ||
COALESCE(extra.value, '') AS value, | ||
CASE | ||
WHEN COUNT(DISTINCT client_info.client_id) >= 5000 | ||
THEN normalized_country_code | ||
ELSE 'OTHER' | ||
END AS country_code, | ||
COUNT(DISTINCT client_info.client_id) AS client_count | ||
FROM | ||
`moz-fx-data-shared-prod.firefox_desktop.events` AS e, | ||
UNNEST(e.events) AS event, | ||
UNNEST(event.extra) AS extra | ||
WHERE | ||
DATE(submission_timestamp) = @submission_date | ||
AND client_info.client_id IS NOT NULL | ||
AND client_info.app_channel = 'release' | ||
AND event.category = 'doh' | ||
AND event.name = 'evaluate_v2_heuristics' | ||
AND extra.key = 'value' | ||
GROUP BY | ||
submission_date, | ||
key, | ||
value, | ||
normalized_country_code |
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.
These queries should be a lot more efficient with events stream. I think this is equivalent:
SELECT
DATE(submission_timestamp) AS submission_date,
'doh.evaluate_v2_heuristics' AS metric,
"value" AS key,
COALESCE(STRING(event_extra.value), '') AS value,
CASE
WHEN COUNT(DISTINCT client_id) >= 5000
THEN normalized_country_code
ELSE 'OTHER'
END AS country_code,
COUNT(DISTINCT client_id) AS client_count
FROM
`moz-fx-data-shared-prod.firefox_desktop.events_stream` AS e
WHERE
DATE(submission_timestamp) = @submission_date
AND client_id IS NOT NULL
AND client_info.app_channel = 'release'
AND event_category = 'doh'
AND event_name = 'evaluate_v2_heuristics'
GROUP BY
submission_date,
key,
value,
normalized_country_code
kwindau
approved these changes
Oct 16, 2025
edbd732
to
12406eb
Compare
This comment has been minimized.
This comment has been minimized.
BenWu
reviewed
Oct 16, 2025
sql/moz-fx-data-shared-prod/telemetry_derived/doh_adoption_rate_v1/query.sql
Outdated
Show resolved
Hide resolved
BenWu
reviewed
Oct 16, 2025
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.
Missing comma in the query but otherwise LGTM
…e_v1/query.sql Co-authored-by: Ben Wu <[email protected]>
Integration report for "Update sql/moz-fx-data-shared-prod/telemetry_derived/doh_adoption_rate_v1/query.sql"
|
Any commits made after this event will not be merged.
Any commits made after this event will not be merged.
Any commits made after this event will not be merged.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
https://bugzilla.mozilla.org/show_bug.cgi?id=1982897
This query aggregates and publishes DOH adoption and usage rates.
@edugfilho This is similar to #7367, so you're probably the best person to review. I'll file a separate PR to backfill this once the tables have been deployed.
Related Tickets & Documents
Reviewer, please follow this checklist