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

Abierto
#303 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github, node.js, typescript

Línea de trabajo

Read packages/diffci-cli/src/client/usage-signal.ts, packages/diffci-cli/src/client/telemetry.ts around surfaceOf, and docs/telemetry.md; compare them with integrations/azure-devops/DiffCIObserve/index.js:131. First confirm with a maintainer which surface value the usage endpoint accepts, as the issue identifies this as an unresolved dependency. Done when Azure task runs are recorded under that accepted surface and the documentation and client types agree.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

What went wrong?

The Azure DevOps task tags its CLI runs with a surface that telemetry doesn't recognise, so Azure task runs are counted as surface: "cli".

  • integrations/azure-devops/DiffCIObserve/index.js:131 runs the CLI with DIFFCI_SURFACE: "azure-devops-task".
  • packages/diffci-cli/src/client/telemetry.ts:94-98 (surfaceOf) only passes through github-action and gitlab-component, and maps everything else to cli.
  • UsageSurface (packages/diffci-cli/src/client/usage-signal.ts:4) and docs/telemetry.md:18 list only cli, local-mcp, github-action and gitlab-component.

This is the Azure counterpart of #284 (the GitHub Action's observe step sets no surface).

DiffCI version

core main 40aa308 (CLI 0.3.54)

Repro

Run with tsx from packages/diffci-cli. The script stubs fetch and records the usage bodies:

import { mkdtempSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path";
import { recordUsage } from "./src/client/telemetry.ts";
const bodies: any[] = [];
globalThis.fetch = async (_u, init) => { bodies.push(JSON.parse(String(init?.body))); return new Response(null, { status: 200 }); };
const env = { DIFFCI_TELEMETRY_HOME: mkdtempSync(join(tmpdir(), "t-")), TF_BUILD: "True" };
for (const s of ["github-action", "gitlab-component", "azure-devops-task"]) await recordUsage("observe", "observed", "0.3.54", {}, { ...env, DIFFCI_SURFACE: s });
console.log(bodies.map((b) => b.surface));

Actual: [ 'github-action', 'gitlab-component', 'cli' ]

Expected

Azure DevOps task runs are counted under their own surface, the way the GitHub Action and the GitLab component are. That means adding the task's value (or an agreed name such as azure-devops-task) to UsageSurface, surfaceOf and docs/telemetry.md.

The usage endpoint may also need to accept the new value. That's why this issue has no PR yet: a maintainer should confirm the value the ingest side accepts before the client starts sending it.

Lenguaje dominante
TypeScript
Estrellas
0
Forks
4
Merge medio
18 h 41 min
PR fusionados (30 d)
48

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DiffCI/core

Todos los issues de DiffCI/core

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.