feat: Log on successful POST to DCR - #28984
Merged
Merged
Conversation
akash1810
force-pushed
the
aa/dcr-request-logging
branch
from
July 23, 2026 12:52
852107b to
baae2eb
Compare
Contributor
akash1810
force-pushed
the
aa/dcr-request-logging
branch
from
July 23, 2026 13:16
baae2eb to
bc31d67
Compare
7 tasks
akash1810
marked this pull request as ready for review
July 23, 2026 13:41
Add a log line after a request to DCR has been made to aid debugging. Whilst load testing DCR's tag-page-rendering, we've observed a correlation between payload size and latency. This log line should allow us to graph this to confirm this hypothesis.
akash1810
force-pushed
the
aa/dcr-request-logging
branch
from
July 23, 2026 17:32
bc31d67 to
e50fc86
Compare
|
Seen on ADMIN-PROD (merged by @akash1810 8 minutes and 39 seconds ago)
|
|
Seen on FRONTS-PROD (merged by @akash1810 9 minutes and 44 seconds ago)
|
Member
Author
pull Bot
pushed a commit
to TheDegenerateDev5150/frontend
that referenced
this pull request
Jul 27, 2026
Updates guardian#28984 to include the content length of the DCR response as a marker.
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.


Note
This is a trimmed down version of #28983.
What does this change?
Whilst load testing DCR's tag-page-rendering, we've observed a correlation between payload size and latency. This change adds a log line after a request to DCR has been made to aid debugging. The log line is structured, with markers covering the URL, response code, content length and request duration.
I've attempted to namespace the markers to distinguish them from the request logs.
Whilst RelOps have been load testing DCR running on ECS, we've noticed the latency of a request is sometimes unexpectedly high. Additionally, the size of the payload sent to DCR and the size of DCR's response seem wildly different. We've a hypothesis that payload POSTed to DCR is a superset of what it needs (see also #28964 and #27894).
These logs should help us graph the size of the payload and the time taken to read it, so we can see if there's a correlation between the two.
Warning
This change will create a log line for each DCR request. To reduce noise, we could log only when a request is made to tag-page-rendering as that is the service we (RelOps) are currently looking at.
Example
Take https://www.theguardian.com/tone/minutebyminute, the HTML is 357688 bytes:
However, the data POSTed to DCR for this page is 838654 bytes:
Screenshots
After deploying to CODE, we can see the logs in Central ELK:
Checklist
data/databasefiles generated by tests are committed with this PR (the tests will fail in CI if you've forgotten to do this)