Skip to content

Track and emit metric for disconnect time from ACS - #4920

Merged
danehlim merged 1 commit into
aws:devfrom
danehlim:acs-disconnected-time
Apr 9, 2026
Merged

danehlim merged 1 commit into
aws:devfrom
danehlim:acs-disconnected-time

Conversation

@danehlim

@danehlim danehlim commented Apr 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Track time ECS Agent last disconnected from ACS and emit as a metric upon reconnecting to ACS which measures how long ECS Agent spent disconnected before reconnecting to ACS.

Implementation details

  • Add lastDisconnectedTime field to session struct. It gets set to time.Now() whenever a disconnection from ACS occurs
  • Define new ACSSession.ACSDisconnectedDuration metric and emit whenever ECS Agent reconnects to ACS. The metric captures how long the ECS Agent is disconnected for until it reestablishes a WebSocket connection with ACS

Testing

New tests cover the changes: yes (existing tests updated)

Description for the changelog

N/A

Additional Information

Does this PR include breaking model changes? If so, Have you added transformation functions?

No

Does this PR include the addition of new environment variables in the README?

No

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@danehlim
danehlim force-pushed the acs-disconnected-time branch from ebc98df to b3abb2b Compare April 7, 2026 23:51
@danehlim danehlim added bot/test and removed bot/test labels Apr 7, 2026
@danehlim
danehlim marked this pull request as ready for review April 8, 2026 19:48
@danehlim
danehlim requested a review from a team as a code owner April 8, 2026 19:48
@danehlim
danehlim merged commit d30383f into aws:dev Apr 9, 2026
44 checks passed
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.

4 participants