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

Use existing timestamp for request finish in measuring latency metrics #364

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

colmsnowplow
Copy link
Collaborator

Changes in 2.4.2 to how throttling is handled in kinesis would lead to misreporting metrics in cases where we're reporting batches.

Because we take a timestamp for when we provide the WriteResult object, if we have a batch with 499 events succeed within 10ms, but one gets throttled and takes 1s before a retry is successful, then 499 events will report 1+s latency where they should report 10ms.

However we already record a timestamp fro when a request finished - this PR changes the metrics to compute latency based on that timestamp instead.

This will likely make little to no difference to our metrics in prod because we usually don't batch the data - but that will change, so it's worth fixing now regardless.

@colmsnowplow colmsnowplow merged commit b998b05 into release/2.4.2 Sep 4, 2024
1 check passed
@colmsnowplow colmsnowplow deleted the metrics-tweak branch September 4, 2024 09:35
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