Skip to content
This repository was archived by the owner on Jul 30, 2026. It is now read-only.
This repository was archived by the owner on Jul 30, 2026. It is now read-only.

[21/48] OBSERVABILITY: Add per-stage WizCLI telemetry (auth duration, scan duration, output bytes, exit code, client version) #67

Description

@anota-fernandocosta

Severity: High (long-term band recommendation; precondition for investigations Wiz-06/07/08)

Evidence

Impact

Without per-stage telemetry, the team cannot calibrate the 600 s envelope (Probable #8), characterize outage behavior (Probable #7), or judge whether consolidating variants would actually reduce cloud-side load (Probable #9). All three downstream investigations are blocked on this data.

Recommendation

Instrument each WizCLI scan with at minimum:

  • wiz.auth_duration_ms
  • wiz.scan_duration_ms
  • wiz.output_bytes
  • wiz.exit_code
  • wiz.client_version (extracted from extraInfo.clientVersion in the JSON report, or from a wizcli --version probe in the cmd block)
  • wiz.timeout_reason (auth / scan / other) when applicable

Persist alongside existing scan documents in MongoDB so investigations can query historical traffic.

Dependencies

Cross-references

Verifiable by: New unit tests for telemetry capture; manual scan that emits a populated telemetry document.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions