Skip to content

Comments

ATO-2350: use timestamp to emit metric#7873

Draft
Ryan-Andrews99 wants to merge 3 commits intoATO-2350-add-spot-queued-metricfrom
ATO-2350-use-timestamp-to-emit-metric
Draft

ATO-2350: use timestamp to emit metric#7873
Ryan-Andrews99 wants to merge 3 commits intoATO-2350-add-spot-queued-metricfrom
ATO-2350-use-timestamp-to-emit-metric

Conversation

@Ryan-Andrews99
Copy link
Contributor

Now we're storing the queued at timestamp, we can now emit a metric for the latency of SPOT, calculating the difference between now and the time at which the request was queued

Wider context of change

What’s changed

Manual testing

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
Now we're storing the queued at timestamp, we can now emit a metric
for the latency of SPOT, calculating the difference between now
and the time at which the request was queued
@sonarqubecloud
Copy link

@Ryan-Andrews99 Ryan-Andrews99 force-pushed the ATO-2350-add-spot-queued-metric branch from 4112018 to 394af97 Compare February 20, 2026 17:09
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