Skip to content

CoR: Add telemetry for azure-deploy artifacts - #1831

Merged
Matthew Fisher (MicroFish91) merged 3 commits into
feat/CoRfrom
microfish91-deploy-artifact-telemetry
Sep 12, 2026
Merged

Matthew Fisher (MicroFish91) merged 3 commits into
feat/CoRfrom
microfish91-deploy-artifact-telemetry

Conversation

@MicroFish91

@MicroFish91 Matthew Fisher (MicroFish91) commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@MicroFish91 Matthew Fisher (MicroFish91) changed the title Add privacy-conscious telemetry for azure-deploy artifacts CoR: Add telemetry for azure-deploy artifacts Sep 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Outstanding issues affect telemetry timing, failure-state reporting, and Deployment Plan data compatibility.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds privacy-filtered telemetry for azure-deploy artifacts during deployment-result handoff.

Changes:

  • Adds artifact parsing and allowlisted telemetry metrics.
  • Adds fixtures and focused parsing, failure, privacy, and integration tests.
  • Wires telemetry into the deployment-results handoff.
File summaries
File Summary
test/testProjects/copilotOnRails/attendance/scaffold-manifest.json Scaffold telemetry fixture
test/testProjects/copilotOnRails/attendance/prereq-output.json Prerequisite telemetry fixture
test/testProjects/copilotOnRails/attendance/prepare-plan.json Needs parser-compatible service and cost fields restored
test/testProjects/copilotOnRails/attendance/deploy-result.json Deployment telemetry fixture
test/copilotOnRails/recordDeployArtifactsTelemetry.test.ts End-to-end recording tests
test/copilotOnRails/deployScaffoldTelemetryUtils.test.ts Scaffold extraction tests
test/copilotOnRails/deployResultTelemetryUtils.test.ts Deployment extraction tests
test/copilotOnRails/deployPrereqTelemetryUtils.test.ts Prerequisite extraction tests
test/copilotOnRails/deployPrepareTelemetryUtils.test.ts Preparation extraction tests
test/copilotOnRails/deploymentPlanTelemetryUtils.test.ts Deployment-plan telemetry coverage
src/webviews/copilotOnRails/extension/utils/deployArtifactTelemetryUtils.ts Needs failure-state metric emission and documentation updates
src/webviews/copilotOnRails/extension/openDeployResultView.ts Returns the selected result URI
src/chat/tools/copilotOnRails/openDeployResultViewTool.ts Needs awaited inventory capture and diagnostics documentation updates
Review details

Suppressed comments (4)

src/chat/tools/copilotOnRails/openDeployResultViewTool.ts:30

  • The new call records four artifact-derived properties into the workspace-cached diagnostics via setCorProp, but docs/copilot-create-project.md still describes only the generic properties bag and does not document these new fields or their allowlisted privacy contract. Update the support/triage diagnostics and privacy section in the same change so Inspect Diagnostics and Report Issue remain accurate.
                    await recordDeployArtifactsTelemetry(corContext, resultFile);

src/webviews/copilotOnRails/extension/utils/deployArtifactTelemetryUtils.ts:112

  • Returning before setCorProp when deployResult.status is not terminal drops every collected metric, including deployResult.parsedOk: false or readFailed for a malformed/unreadable final artifact. Those are the diagnostics needed for exactly that failure mode; emit the allowlisted properties even when the result is missing, invalid, or unfinished instead of discarding them.
    if (properties['deployResult.status'] !== 'succeeded' && properties['deployResult.status'] !== 'failed') {
        return;

test/testProjects/copilotOnRails/attendance/prepare-plan.json:43

  • This fixture no longer matches the fields consumed by parsePreparePlanJson: its service entries use id/kind/componentId, while the parser reads name/sku/component/resourceName and drops entries that have neither name nor resourceName. Opening this project's Deployment Plan therefore renders missingServices; removing the attendance deployment-plan test hides the regression. Keep the canonical fields or update the parser and add a view regression test.
      "id": "attendance-api",
      "kind": "azure-functions",
      "sku": "Flex Consumption (FC1)",
      "region": "eastus2",
      "runtime": "node",

test/testProjects/copilotOnRails/attendance/prepare-plan.json:190

  • The Deployment Plan parser only reads costEstimate.monthlyUsd and costEstimate.breakdown[], but this fixture replaces them with monthlyTotalUsd and items. It will display a $0 estimate with no breakdown in the Deployment Plan, and the removed attendance test no longer catches it. Preserve the canonical fields or teach the parser this alternate layout.
    "monthlyTotalUsd": 32,
    "monthlyRangeUsd": {"low": 25, "high": 40},
    "items": [
      {"service": "Function App (Flex Consumption FC1)", "monthlyUsd": 2, "assumption": "Dev traffic: ~500K executions, mostly under free grant."},
      {"service": "Storage Account (Standard_LRS)", "monthlyUsd": 1, "assumption": "Functions runtime + small blob usage."},
  • Files reviewed: 13/13 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/chat/tools/copilotOnRails/openDeployResultViewTool.ts
@MicroFish91
Matthew Fisher (MicroFish91) merged commit 5dacef3 into feat/CoR Sep 12, 2026
2 checks passed
@MicroFish91
Matthew Fisher (MicroFish91) deleted the microfish91-deploy-artifact-telemetry branch September 12, 2026 15:40
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.

2 participants