altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

Review feature emits no telemetry, and callers are indistinguishable

Open sahrizvi opened this issue 4 months ago • 1 comments

Problem

The dbt/SQL review feature emits no telemetry. cli/cmd/review.ts and altimate/review/run.ts contain no Telemetry references, and the CLI path creates no session, so it never picks up session_start either.

We can't answer basic questions about it: how often it runs, whether it's run by a person or by an agent, whether it finds anything, or whether results get published.

Also: callers are indistinguishable

Flag.ALTIMATE_CLI_CLIENT is already stamped as source on every event, but only cli/cmd/acp.ts sets it. Every other entry point reports the default cli, so a plugin, a CI job and a human look identical.

Proposal

Two events emitted from a shared helper used by both callers of the review engine — the review command and the dbt_pr_review tool — distinguished by an invocation field:

  • review_run — one per engine invocation, status: completed | failed, plus verdict, mode, tier, and finding counts by severity and category
  • review_post_outcome — publication result, CLI path only

Caller attribution needs no code change: if the new events don't declare a source field, the envelope's existing process-level value passes through, so a caller that exports ALTIMATE_CLI_CLIENT is attributed automatically.

Enums, booleans and counts only. Review findings are about customer schema, so no file paths, model or column names, finding text, SQL or diff content.

sahrizvi avatar Aug 02 '26 22:08 sahrizvi

Resolved in v0.9.5.

sahrizvi avatar Aug 10 '26 18:08 sahrizvi