Skip to content

telemetry: instrument the state-aware sandbox lifecycle #562

Description

@RamonArjona4

Description of the new feature / enhancement

The state-aware sandbox lifecycle is entirely uninstrumented for telemetry. run_state_aware_main (src/core/wxc/src/main.rs ~line 229, dispatched ~line 684) runs before telemetry init and returns !, so the whole provision → start → exec → stop → deprovision flow emits zero telemetry. With the IsolationSession state-aware work landed, all of its failures (provision failure, backend_unavailable, exec errors) are invisible. docs/telemetry.md already notes this gap.

Instrument the state-aware path so each phase emits completion/error telemetry comparable to the one-shot emit_completion/emit_early_exit coverage.

Proposed technical implementation details

  • Initialize telemetry inside run_state_aware_main (it currently bypasses the one-shot init at ~line 702), reading experimental.telemetry.enabled from the parsed state-aware request.
  • Emit per-phase MXC.Execution/MXC.Error events (provision/start/exec/stop/deprovision) reusing the helpers in src/core/wxc_common/src/telemetry/mod.rs.
  • Keep data-minimization (bounded reason categories only; no free-form message text).

Deferred from PR #493.

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions