-
Couldn't load subscription status.
- Fork 11
[EDS] pageviews min cwv count threshold #1012
Conversation
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.
I'm not really clear what this query is supposed to be doing.
| WHERE | ||
| url LIKE CONCAT("https://", @url, "%") | ||
| OR url LIKE CONCAT( | ||
| "https://%", @repo, "--", @owner, ".hlx%/" | ||
| ) OR (@url = "-" AND @repo = "-" AND @owner = "-") | ||
| GROUP BY id | ||
| ), |
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.
This does not work/is superfluous. helix_rum.EVENTS_V3 already filters by URL. And @owner and @repo aren't working.
| ON filtered_data.url = cru.url | ||
| WHERE | ||
| cwv_count > @cwv_count_threshold | ||
| AND (ce.events * cru.weight) > @interval * @sampling_noise_factor |
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.
What does @sampling_noise_factor do?
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.
The purpose is to define a minimal average pageviews per day to only return records over the threshold for the given interval.
pageviews > interval * 1000 is up to debate. We arbitrarily chose 1000, just to be on the safe side (sampling noise).
That being said, sampling_noise_factor is a terrible variable name, I'll rename this variable to avg_daily_pageviews_factor instead to make it clearer, and give the consumers to fine tune it accordingly.
Co-authored-by: Lars Trieloff <lars@trieloff.net>
Co-authored-by: Lars Trieloff <lars@trieloff.net>
Co-authored-by: Lars Trieloff <lars@trieloff.net>
Co-authored-by: Lars Trieloff <lars@trieloff.net>
This is fair, this use case is quite specific, I've added more context to the PR description. |
|
Closing in favor of #1013 |
This introduces a new query for EDS alerting requirements. It aims to return urls, with their respective pageviews and p75 cwv for a given url pattern (e.g.: www.adobe.com/express), having a minimal count of cwv events matching the cwv_type passed as a parameter.
This can be helpful to know which URLs with a cwv count (for the cwv_type passed as parameter, e.g.: LCP) greater than the threshold passed as parameter.
Related Issues
https://cq-dev.slack.com/archives/C05A45JBP9N/p1700727862022749
Some adjustements from the initial thread have been made
cwv_typeadded as a parameter to retrieve records with cwv min count (cwv type specific)cwv_count_thresholdminimum count threshold to expose resultsavg_daily_pageviews_factorparameter, aiming to reduce pageviews calculation issues related to samplingPlease ensure your pull request adheres to the following guidelines: