Skip to content

feat(logging): log candidate vs reference latency delta - #27

Merged
jvmakine merged 1 commit into
mainfrom
feat/correlation-latency-delta
Oct 8, 2026
Merged

jvmakine merged 1 commit into
mainfrom
feat/correlation-latency-delta

Conversation

@jvmakine

@jvmakine jvmakine commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Response comparison correlation logs recorded whether each ingress candidate matched the reference, but not whether the candidate was faster or slower. That left latency regressions invisible from the correlation logs alone.

This records each backend's time to first byte in the ingress capture writer and logs their difference as dt on the "Response comparison completed" line, for example dt=-143ms. The value is the candidate's latency minus the reference's: negative when the candidate was faster, positive when it was slower. It is omitted when either side was not timed.

Time to first byte is used rather than full response time so the reference, which streams its body to the real client, is not penalised by a slow downstream reader while the candidate drains to a discard sink.

The egress correlation is left unchanged: there the candidate replays the reference's recorded response instead of making its own dependency call, so there is no independent candidate latency to compare.

🤖 Generated with Claude Code

Response comparison correlation logs showed whether an ingress candidate
matched the reference but not whether it was faster or slower, so latency
regressions were invisible from the logs alone.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jvmakine
jvmakine requested a review from alecthomas as a code owner October 8, 2026 02:26
@jvmakine
jvmakine merged commit d1c070c into main Oct 8, 2026
6 checks passed
@jvmakine
jvmakine deleted the feat/correlation-latency-delta branch October 8, 2026 02:30
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