Skip to content

Telemetry: instrument startup path (activation, remote setup, CLI binary) #904

@EhabY

Description

@EhabY

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

Instruments the single call chain from extension activation through workspace readiness.

Events

  • activation with result, authState, measurement durationMs. Error variant adds phase.
  • remote.setup (parent) with result, measurement durationMs. Wrap in TelemetryService.trace("remote.setup", ...) so all phases share a traceId.
  • remote.setup.phase per phase with phase, result, measurement durationMs. Phases: auth retrieval, workspace lookup, workspace ready, SSH config write, agent ready.
  • cli.download with result, reason (missing, version_mismatch, forced), measurements durationMs, sizeBytes.
  • cli.verify with result, measurement durationMs.

Sites

  • src/extension.ts activation function.
  • src/remote/remote.ts setup flow (wrap in telemetry.trace(...)).
  • src/core/cliManager.ts download and verify paths.

Tests

  • Use a TestSink injected via the service container.
  • Happy path emits the expected event names in order.
  • Phase events share a traceId with the parent.
  • Mid-phase failure emits error on the failing phase and success on prior phases.
  • cli.verify failure emits the correct error fields.

Depends on AIGOV-243, ENG-2458.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions