fix(dataplane): capture delivery attempt timestamps around the dispatch call#2707
Merged
Merged
Conversation
…ch call requested_at was stamped at httpDispatchStart, before signature/header/mTLS prep, and responded_at was httpDispatchStart + elapsed duration, so responded_at - requested_at overstated real endpoint latency by our own prep time. Capture requestSentAt immediately before SendWebhookWithMTLS and responseReceivedAt immediately after it in both the primary and retry paths, and pass those to parseAttemptFromResponse. The resp != nil && StatusCode >= 100 guard is unchanged, so responded_at stays null on no-response. Adds flow tests driving a slow loopback server through a real dispatcher to assert responded_at - requested_at reflects the actual round trip.
|
Current version of PR was reviewed by /review-bugbot on Jul 7, 21:48 GMT+1. It flagged 0 findings. Bugbot on commit |
mekilis
added a commit
that referenced
this pull request
Jul 8, 2026
bump VERSION to v26.6.2 and backfill CHANGELOG.md through v26.6.2 with git-cliff. the changelog had frozen at 26.3.6 while tags advanced to v26.6.1, and VERSION had frozen at v26.2.2 (nothing in the release flow bumps it). regenerate the missing 26.3.7, 26.6.0, 26.6.1 sections and add 26.6.2 for the three commits since v26.6.1 (#2705, #2706, #2707).
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.
Summary
requested_aton a delivery attempt was stamped athttpDispatchStart, captured before signature/header/mTLS prep, andresponded_atwashttpDispatchStart + elapsed duration. Soresponded_at - requested_atoverstated real endpoint latency by our own pre-send prep time.requestSentAtimmediately before theSendWebhookWithMTLScall andresponseReceivedAtimmediately after it returns, in bothprocess_event_delivery.goandprocess_retry_event_delivery.go, and pass those toparseAttemptFromResponse.resp != nil && resp.StatusCode >= 100guard is unchanged, soresponded_atstays null on no-response.httpDispatchStart/durationremain for the existing latency logging (no orphans).Test plan
gofmt,go vet,golangci-lintclean onworker/taskworker/taskpackage green (122 tests)TestProcess{Event,RetryEvent}Delivery_AttemptTimingReflectsWireDelaydrive a slow loopback server through a real dispatcher and assertresponded_at - requested_atreflects the actual round trip (guards against regressing to prep-inclusive timing)