mirror of
https://github.com/microsoft/vscode.git
synced 2026-06-29 19:06:00 +01:00
d8716e0178
* Instrument Cloud Agent backend v1/v2 rollout Put the `chat.cloudAgentBackend.version` toggle (v1 = Jobs API, v2 = Task API) behind an experiment so the rollout can be ramped and rolled back remotely via ExP, and add an arm-tagged telemetry surface so the two backends emit identical funnel and guardrail signals for apples-to-apples monitoring. Previously v1 was partly instrumented and v2 emitted nothing, making any A/B comparison impossible. A shared `ICloudBackendInstrumentation` is now injected into both backends and stamps every event with `backendVersion`, covering session creation, activation, follow-up, and per-operation errors, plus matching OTel metrics. v2's silent catch sites now report through it, and `TaskApiError` carries the HTTP status for error classification. Legacy v1 backend events are consolidated into the shared surface and kept for dashboard continuity. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Rename "arm" to "backend version" in cloud telemetry comments "arm" is A/B-experiment jargon not used elsewhere in the codebase. Swap it for "backend version" in comments, docstrings, and GDPR comment text to match the existing `backendVersion` / v1 / v2 vocabulary. Comment-only change; no identifiers or behavior affected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address cloud backend rollout PR review comments - Move backend_version attribute to the canonical github.copilot.* namespace - Derive numeric HTTP status inside operationFailed so the status measurement is populated - Carry HTTP status on v1 (Jobs API) invalid-job errors via JobsApiError so v1 create failures classify by status - Only emit cloud pr_ready.count for v1 (Task API activation is a first turn, not a PR) - Add unit tests for the new cloud metrics - Document the new cloud operation/error metrics and backend_version attribute Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix TaskApiBackend construction in fetchSessionList specs Three fetchSessionList test cases constructed TaskApiBackend without the required instrumentation argument, failing the CI typecheck (TS2554). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>