Skip to content

Telemetry: instrument auth and workspace lifecycle #906

@EhabY

Description

@EhabY

Part of the Telemetry Phase A rollout. See the RFC in Linear: AIGOV-154.

Events

  • auth.token_refresh with result, trigger, measurement durationMs.
  • auth.intercept_401 with recovery.
  • auth.login_prompt with trigger, result.
  • workspace.start with result, measurement durationMs. Emitted when the user opens a workspace and it transitions to running.
  • workspace.stop with trigger (user, idle).
  • workspace.update.triggered with result, measurement durationMs.

Sites

  • src/oauth/sessionManager.ts refresh path.
  • src/api/authInterceptor.ts 401 handling.
  • src/login/loginCoordinator.ts login-dialog path.
  • Workspace-related command handlers (start, stop, update).

Tests

  • TestSink assertions for each event.
  • Token refresh emits on both background and reactive triggers.
  • 401 path emits with the right recovery value for the refresh-success and login-required cases.
  • Workspace start emits on successful transition to running, error event on failure.

Depends on AIGOV-243, AIGOV-273.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions