ATO-2350: add spot queued timestamp to identity credentials#7871
Draft
Ryan-Andrews99 wants to merge 2 commits intomainfrom
Draft
ATO-2350: add spot queued timestamp to identity credentials#7871Ryan-Andrews99 wants to merge 2 commits intomainfrom
Ryan-Andrews99 wants to merge 2 commits intomainfrom
Conversation
Adds SpotQueuedAtMs attribute which will store a Millisecond unix timestamp which represents when a SPOT request has been queued. We will use this at SPOT response handler to caclulate the response time of SPOT I have made this a boxed Long,as there are some cases in which SPOT will not be queued (such as in the return code scenario)
We would like to time how long SPOT takes per journey, and to do this we need to persist the timestamp, in milliseconds, of when we queued a SPOT request. We can't do this in metrics becasue it would generate a unique metric with new dimensions per journey. Instead we can store the timestamp on serialising the identity credentials in dynamo. Then we can compare this on SPOT response to get a measure of how long SPOT takes
4112018 to
394af97
Compare
|
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.



Wider context of change
Our interface with SPOT may become a synchronous wait. We would like an accurate measure of SPOT latency, to emit metrics on this before we make any changes in higher environments.
What’s changed
SpotQueuedAtMswhich is a millisecond UNIX timestamp taken after we queue the SPOT request. This will be added only in the cases we queue SPOT (not in return code scenarios - in which case it will be null). Once we have added this we can, in the SPOT response handler, use this timestamp to emit metrics on SPOT's latency.Manual testing:
Checklist
Related PRs