Emit browser_family device signal in auction telemetry - #1039
Draft
jevansnyc wants to merge 1 commit into
Draft
Conversation
Derive a coarse browser family (chrome, safari, firefox, edge, opera) from the User-Agent in DeviceSignals, next to is_mobile and platform_class. Order the checks so Edge, Opera, and the iOS Chrome/Firefox agents classify correctly despite embedding Chrome/Safari tokens. Carry browser_family through the auction observation context onto AuctionEventRow so it ships in the Tinybird NDJSON, and add the matching browser_family column to the auction_events_raw datasource. The value is a low-cardinality family label only; no raw User-Agent leaves the edge, consistent with the existing device-signal privacy stance. The field is forward-only: rows emitted before deploy stay null.
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
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.
What
Adds a
browser_familydimension to auction telemetry.DeviceSignals::derivenow classifies a coarse browser family (
chrome,safari,firefox,edge,opera) from the User-Agent, and the value flows through the auctionobservation context onto
AuctionEventRowinto the Tinybird NDJSON. Adds thematching
browser_familycolumn to theauction_events_rawdatasource.Why
Enables CPM and yield breakdowns by browser (Chrome vs Safari vs Firefox) in the
auction telemetry dashboards. The pipeline already emitted
is_mobileand abot-vs-real
is_known_browserboolean, but nothing identified the browserfamily.
Notes
parse_is_mobile/parse_platform_classpattern. Check order is Edge, Opera, Firefox, Chrome,Safari, because the Edge, Opera, and iOS Chrome/Firefox agents embed
Chrome/Safaritokens and would otherwise misclassify.edge, consistent with the current device-signal stance.
Verification
cargo test -p trusted-server-coredevice and telemetry modules pass,including new
browser_familyunit tests and the NDJSONserialization / no-private-ids test.
cargo clippyclean on core (native) andtrusted-server-adapter-fastly(
wasm32-wasip1).cargo fmt --all -- --checkclean.Follow-ups (not in this PR)
browser_familycolumnand a redeploy for ingestion to retain the field.