Skip to content

Review feature emits no telemetry, and callers are indistinguishable #1065

Description

@sahrizvi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions