Skip to content

feat: emit BYO AKS hosting adoption telemetry in Foundry provision - #10974

Draft
Hui Miao (huimiu) wants to merge 1 commit into
hui/byo-aks-telemetry-contractfrom
hui/byo-aks-telemetry-extension
Draft

Hui Miao (huimiu) wants to merge 1 commit into
hui/byo-aks-telemetry-contractfrom
hui/byo-aks-telemetry-extension

Conversation

@huimiu

@huimiu Hui Miao (huimiu) commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

We cannot yet see how many azd provision or azd up runs select BYO AKS agent hosting. Building on #10973, this PR emits a dedicated agent.hosting.selected event with ext.agent.hosting.mode="byo_aks" during azure.ai.projects Deploy when agentHosting.enabled resolves to true, keeping agent.phase.completed timing telemetry unchanged.

Changes

  • Add AgentHostingMode (byo_aks) and AgentHostingSelected in cli/azd/extensions/azure.ai.projects/internal/telemetry/events.go with unit tests
  • Add reportAgentHosting in aks_hosting.go and invoke it once in FoundryProvisioningProvider.Deploy right after resolveTemplate succeeds
  • Add ReportUsage provisioning tests in aks_hosting_telemetry_test.go covering BYO AKS success, disabled preview gate with $ref, invalid cluster/identity IDs, preflight and model-policy failures, non-BYO projects, on-disk parameter overrides, malformed agentHosting inputs, Preview omission, and zero ID leakage
  • Update cli/azd/extensions/azure.ai.projects/README.md to document agent.hosting.selected (ext.agent.hosting.mode="byo_aks")

Telemetry change

What changed: azure.ai.projects emits one ext.usage span where extension.event="agent.hosting.selected" and ext.agent.hosting.mode="byo_aks" (core field contract declared in base PR #10973) during FoundryProvisioningProvider.Deploy when byoHostingParameter(source) resolves effective agentHosting.enabled == true from azure.yaml, $ref service files, or on-disk deployment parameters. Before: Foundry provisioning emitted no BYO AKS adoption signal. After: BYO AKS Deploy runs emit agent.hosting.selected once before preview-gate, validation, preflight, and ARM deploy, while agent.phase.completed remains timing-only and azd provision --preview, projects without agentHosting, enabled: false overrides, and malformed agentHosting inputs emit no agent.hosting.selected event.
Why it is needed: count BYO AKS provision attempts as a standalone FeatureInsight adoption signal, and join on operation_Id with cmd.provision, cmd.up, or agent.phase.completed for outcomes (machine.id for distinct machines) and agent.context.resolved (ext.agent.container.mode) for container packaging without resource IDs.
Approval coverage (maintainer): pending assessment

  • Values are limited to what is needed; custom and invalid inputs are handled.
  • Field/event declarations, classification, purpose, identifier metadata, hashing rules, and affected telemetry docs are updated. Core field contract and shared docs are in base PR feat: declare agent hosting mode extension telemetry field #10973; extension docs are updated here. No identifiers are added; hashing is not applicable to the bounded "byo_aks" enum.
  • Focused tests check emitted and excluded values, including hashes where relevant. Opt-out behavior is unchanged.
  • Known affected queries, tables, reports, or exports are listed, with an owner for follow-up or migration. Existing ext.usage consumers are unaffected by the new event; maintainer to assign an analytics owner for new BYO AKS Kusto queries.
  • Code changes, metadata deployment, and downstream checks have separate statuses and owners. Core contract is in base PR feat: declare agent hosting mode extension telemetry field #10973 (@huimiu); extension code, tests, and docs are complete here (@huimiu); metadata rollout and approval assessment are pending maintainer review; production Kusto query check is pending post-release rollout (@huimiu and maintainer-assigned analytics owner).

Open questions or follow-ups: merge base PR #10973 first, maintainer approval-coverage assessment before rollout, and post-release Kusto query check after azure.ai.projects ships (@huimiu).

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
27 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions github-actions Bot added ext-agents azure.ai.agents extension ext-projects azure.ai.projects extension labels Nov 17, 2026
@huimiu
Hui Miao (huimiu) force-pushed the hui/byo-aks-telemetry-extension branch from a749a39 to 2d2e312 Compare November 18, 2026 08:28
@huimiu Hui Miao (huimiu) changed the title feat: add BYO AKS marker to Foundry provision telemetry feat: emit BYO AKS hosting adoption telemetry in Foundry provision Nov 18, 2026
@huimiu
Hui Miao (huimiu) force-pushed the hui/byo-aks-telemetry-extension branch from 2d2e312 to 84c8df9 Compare November 20, 2026 00:08
@huimiu
Hui Miao (huimiu) force-pushed the hui/byo-aks-telemetry-extension branch from 84c8df9 to 9223469 Compare November 23, 2026 00:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.agents extension ext-projects azure.ai.projects extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant