Skip to content

Comments

ATO-2350: add spot queued timestamp to identity credentials#7871

Draft
Ryan-Andrews99 wants to merge 2 commits intomainfrom
ATO-2350-add-spot-queued-metric
Draft

ATO-2350: add spot queued timestamp to identity credentials#7871
Ryan-Andrews99 wants to merge 2 commits intomainfrom
ATO-2350-add-spot-queued-metric

Conversation

@Ryan-Andrews99
Copy link
Contributor

@Ryan-Andrews99 Ryan-Andrews99 commented Feb 20, 2026

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

  • Adds a new attribute on our Identity credentials table called SpotQueuedAtMs which 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:

  • TODO: Deploy to dev
  • Run through an identity journey
  • Check timestamp is stored
  • Complete journey successfully

Checklist

  • Lambdas have correct permissions for the resources they're accessing.
  • Impact on orch and auth mutual dependencies has been checked.
  • Changes have been made to contract tests or not required.
  • Changes have been made to the simulator or not required.
  • Changes have been made to stubs or not required.
  • Successfully deployed to authdev or not required.
  • Successfully run Authentication acceptance tests against sandpit or not required.

Related PRs

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
@Ryan-Andrews99 Ryan-Andrews99 force-pushed the ATO-2350-add-spot-queued-metric branch from 4112018 to 394af97 Compare February 20, 2026 17:09
@Ryan-Andrews99 Ryan-Andrews99 changed the title AT0-2350: add spot queued timestamp to identity credentials ATO-2350: add spot queued timestamp to identity credentials Feb 20, 2026
@sonarqubecloud
Copy link

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