Skip to content
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

Deliver P2A metrics to the same endpoint at P3A #20478

Closed
rillian opened this issue Jan 12, 2022 · 3 comments
Closed

Deliver P2A metrics to the same endpoint at P3A #20478

rillian opened this issue Jan 12, 2022 · 3 comments
Assignees
Labels

Comments

@rillian
Copy link

rillian commented Jan 12, 2022

Description

We introduced a temporary "P2A" metrics endpoint to measure ad interaction opportunities. This overloads the normal P3A usage data reporting mechanism with some additional privacy protections to handle this level 3 data:

  • Responses are limited to 2 answers (vs 8 for P3A)
  • Responses have random noise added for local differential privacy
  • We do not collect the submission's IP address

These techniques are generally applicable; it would be easier to treat them as an optional step applied to some P3A measurements instead of using a separate back-end. The creation of the new json reporting endpoint in #15967 is a good opportunity to start sending both metric streams to the same endpoint url, simplifying the client-side by more effectively making the current P2A metrics a variety of P3A data.

Proposed Design

Starting with the switch to json-formatted messages, we'd simple start reporting Brave.P2A.* measurements to the same endpoint url as all other P3A messages.

Initially we could continue to set the X-Brave-P2A and X-Brave-P3A variant headers to mark the difference, but the back-end should eventually sort based on the metric name alone.

We would need to verify that the p3a json endpoint proxy strips the client IP address so our organization cannot associate it with any particular submission.

@rillian rillian added OS/Android Fixes related to Android browser functionality OS/Desktop labels Jan 12, 2022
@rillian rillian self-assigned this Jan 12, 2022
@rillian
Copy link
Author

rillian commented Jan 12, 2022

CC @porteron @moritzhaller @iefremov.

The json endpoint was initially configured in brave/devops#6077

@porteron
Copy link
Member

Should be fine on the reporting side of things. Right now we have separate collections in Redshift for p2a and p3a which will continue to be separate until we completely cutover to the new json format.

If the intention is to combine the future p3a and p2a data then we could aggregate together and consider them the same. As long as the convention is maintained that p2a questions are distinguishable by name then everything should work fine.

rillian added a commit to brave/brave-core that referenced this issue Mar 30, 2022
These are handled with the same reporting software and privacy
protections on the server-side, so there's no value to maintaining
a separate endpoint for the P2A message type. Instead, send them
all to p3a-json.brave.com and sort into the approprate queue
on the back end.

Resolves brave/brave-browser#20478
@rillian
Copy link
Author

rillian commented Apr 4, 2022

We've decided maintain distinct endpoints for P2A and P3A for now.

Closing this in favour of #22079.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants