Skip to content

fix(telemetry): count Azure DevOps task runs as surface azure-devops-task - #307

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/azure-devops-task-surface
Nov 18, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
FredApps:fix/azure-devops-task-surface

Conversation

@FredApps

@FredApps FredApps commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Needs maintainer: confirm that https://app.diffci.com/v1/usage-events accepts surface: "azure-devops-task" (or say which value it expects). If it does, this can be marked ready as is; if it validates surface strictly, the server needs that value first, or Azure runs stop being counted.

Fixes #303

Important

Keep this as a draft until a maintainer confirms the usage endpoint (https://app.diffci.com/v1/usage-events) accepts surface: "azure-devops-task". Today the client never sends that value, so nothing has exercised the server with it. If the endpoint validates surface against the four existing values, merging this first could get Azure task usage events rejected instead of counted as cli.

Why: the Azure DevOps task (integrations/azure-devops/DiffCIObserve/index.js:131) runs the CLI with DIFFCI_SURFACE: "azure-devops-task". But surfaceOf (packages/diffci-cli/src/client/telemetry.ts) only passed through github-action and gitlab-component, so every Azure task run was counted as cli. This is the Azure counterpart of #284/#285.

Change

  • usage-signal.ts: UsageSurface gains "azure-devops-task".
  • telemetry.ts: surfaceOf passes azure-devops-task through. Any other value is still counted as cli.
  • docs/telemetry.md: lists the value in the surface row and mentions the Azure DevOps task among the wrappers whose runs are counted.

Test: packages/diffci-cli/tests/client/telemetry.test.ts › "each CI wrapper's surface is counted as itself, and unknown values as cli". It records usage bodies through a stubbed fetch for github-action, gitlab-component, azure-devops-task and an unknown value.

  • On main the result is ['github-action', 'gitlab-component', 'cli', 'cli'] (fails).
  • Here it is […, 'azure-devops-task', 'cli'] (passes).

Local results

The DiffCIObserve task runs the CLI with DIFFCI_SURFACE=azure-devops-task,
but surfaceOf only passed github-action and gitlab-component through, so
Azure runs were counted as cli. Add azure-devops-task to UsageSurface,
pass it through, and list it in docs/telemetry.md. Unknown values still
count as cli.

Fixes DiffCI#303

Signed-off-by: FredApps <[email protected]>
@adityankale190895
adityankale190895 marked this pull request as ready for review November 18, 2026 05:04
@adityankale190895
adityankale190895 merged commit 665fedc into DiffCI:main Nov 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telemetry: the Azure DevOps task's DIFFCI_SURFACE=azure-devops-task is not a recognised surface, so its runs count as cli

2 participants