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

Refactor: Randomize the urls when we run Lighthouse #25

Merged
merged 2 commits into from
Feb 13, 2024

Conversation

ardelato
Copy link
Contributor

@ardelato ardelato commented Feb 12, 2024

Description

Prior to this were were creating a new list of urls to audit and appending a random parameter to each url. This is necessary to ensure that we are not hitting a CDN cache when we are trying to audit the urls. However, when we send the metrics to DataDog, we send the modified url. This causes the metrics to be unique and harder to aggregate or create trends on.

image

We can't drop the group by 'url' in DataDog because we might be sending multiple urls for the same page type which would cause the metrics to be aggregated incorrectly.

image

Instead, let's only modify the urls when we are starting the lighthouse runner which will allow us to send the original url to DataDog.

qa_req 0 I already validated this works by running pnpm run build && pnpm run start and confirmed the urls in DataDog no longer had the rand parameter.

image

Connects: https://github.com/iFixit/ifixit/issues/51901

Prior to this were were creating a new list of urls to audit and appending a
random parameter to each url. This is necessary to ensure that we are not
hitting a CDN cache when we are trying to audit the urls. However, when we send
the metrics to DataDog, we send the modified url. This causes the metrics to be
unique and harder to aggregate or create trends on.

We can't drop the group by 'url' in DataDog because we might be sending multiple
urls for the same page type which would cause the metrics to be aggregated
incorrectly.

Instead, let's only modify the urls when we are starting the lighthouse runner
which will allow us to send the original url to DataDog.
@ghost
Copy link

ghost commented Feb 12, 2024

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

Copy link
Member

@mlahargou mlahargou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR 📱 Checks out to me.

@ardelato ardelato merged commit 9d294b8 into main Feb 13, 2024
1 check passed
@ardelato ardelato deleted the include-original-url-in-tags branch February 13, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants