You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a workspace autostops, the audit log shows build_reason: autostop but provides no context about why the autostop was triggered. This makes troubleshooting difficult, especially in scenarios where:
With this context, an admin can immediately see: "Deadline was set 8 hours ago,activity_bump was 0, and the deadline was never bumped (last_deadline_bump_at: null). Even though there was activity 2 minutes before the stop, the deadline couldn't be extended."
Problem
When a workspace autostops, the audit log shows
build_reason: autostopbut provides no context about why the autostop was triggered. This makes troubleshooting difficult, especially in scenarios where:Current Audit Log Entry
{ "build_reason": "autostop", "workspace_name": "my-workspace", "workspace_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }This tells us what happened but not why.
Proposed Solution
Enhance the autostop audit log to include:
deadlinedeadline_set_atlast_activity_atlast_deadline_bump_atactivity_bump_msactivity_bumpsetting at time of stopttl_msdefault_ttlsetting at time of stopEnhanced Audit Log Entry
{ "build_reason": "autostop", "workspace_name": "my-workspace", "workspace_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "autostop_context": { "deadline": "2025-01-15T14:51:00Z", "deadline_set_at": "2025-01-15T06:51:00Z", "last_activity_at": "2025-01-15T14:49:00Z", "last_deadline_bump_at": null, "activity_bump_ms": 0, "ttl_ms": 0 } }With this context, an admin can immediately see: "Deadline was set 8 hours ago,
activity_bumpwas 0, and the deadline was never bumped (last_deadline_bump_at: null). Even though there was activity 2 minutes before the stop, the deadline couldn't be extended."Related Issues
Impact
Created on behalf of @bjornrobertsson