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

add x-gu-xid header to all requests #27762

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

marjisound
Copy link
Contributor

@marjisound marjisound commented Feb 3, 2025

What does this change?

This PR adds a new Filter (middleware) to the the common filters and is adding x-gu-xid header to the request if it's missing.

Context: As part of this PR #27735 the value of x-gu-xid is retrieved and added as a log field fastlyRequestId to the request logs. If the header is missing, the default value request-id-not-provided is used for the log field. We then realised that there are still quite a lot of logs that are ending up with request-id-not-provided value. But it seems that some of the requests e.g. preview requests or requests coming from nextgen, don't have the x-gu-xid header. So this filter is explicitly adding the header in order to better associate the logs.

The DCR PR that is relevant to this PR: guardian/dotcom-rendering#13266

@marjisound marjisound added this to the Health milestone Feb 3, 2025
@marjisound marjisound force-pushed the add-header-x-gu-xid-to-preview-requests branch 2 times, most recently from 5ba6ee2 to 4643d19 Compare February 3, 2025 15:58
@marjisound marjisound force-pushed the add-header-x-gu-xid-to-preview-requests branch from a464a90 to b2b6586 Compare February 5, 2025 09:49
@marjisound marjisound changed the title add x-gu-xid header to preview requests add x-gu-xid header to all requests Feb 5, 2025
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.

1 participant