Skip to content

feat: add new user agent: microsoft_foundry_canvas#9206

Open
qinezh wants to merge 2 commits into
Azure:mainfrom
qinezh:qinezh/foundry-agent-canvas-telemetry
Open

feat: add new user agent: microsoft_foundry_canvas#9206
qinezh wants to merge 2 commits into
Azure:mainfrom
qinezh:qinezh/foundry-agent-canvas-telemetry

Conversation

@qinezh

@qinezh qinezh commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • recognize microsoft_foundry_canvas in AZURE_DEV_USER_AGENT
  • append Microsoft Foundry Canvas to the existing execution.environment base value
  • extend unit and functional telemetry verification
  • document the modifier in the public telemetry reference and canonical metrics schema

Related issue

Fixes #9207

Testing

  • go test ./internal/tracing/resource -count=1
  • go test ./test/functional -run '^$' -count=1
  • gofmt verification on changed Go files
  • git diff --check
  • go test ./test/functional -run '^Test_CLI_Telemetry_NestedCommands$' -count=1 -timeout 10m reached and verified Desktop;Azure App Spaces Portal;Microsoft Foundry Canvas;Microsoft Foundry Skill; the overall test later failed locally with cmd.package not found after the local multi-tenant prompt changed the expected command flow

Copilot AI review requested due to automatic review settings July 20, 2026 08:33
@azure-pipelines

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

@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution @qinezh! We will review the pull request and get back to you soon.

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.

Pull request overview

Adds Foundry Agent Canvas attribution to azd execution-environment telemetry.

Changes:

  • Detects foundry_agent_canvas in the user agent.
  • Adds unit and functional verification.
  • Documents the telemetry modifier.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/reference/telemetry-data.md Documents the modifier.
cli/azd/test/functional/telemetry_test.go Verifies emitted telemetry.
cli/azd/internal/tracing/resource/resource_test.go Adds modifier unit tests.
cli/azd/internal/tracing/resource/exec_environment.go Detects the user-agent token.
cli/azd/internal/tracing/fields/fields.go Defines the modifier value.

Comment thread cli/azd/internal/tracing/fields/fields.go Outdated
@qinezh qinezh changed the title feat: add Foundry Agent Canvas telemetry attribution feat: add new user agent: foundry_agent_canvas Jul 20, 2026

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Follows the established modifier pattern exactly, with matching unit and functional tests plus a doc update. The append order in the test lines up with the detection order in execEnvModifiers.

On the bot's canonical-schema comment: your won't fix is right. telemetry-schema.md describes execution.environment only as CI system detection and does not enumerate the existing modifiers, so there is nothing to sync here.

Copilot AI review requested due to automatic review settings July 24, 2026 05:11
@qinezh qinezh changed the title feat: add new user agent: foundry_agent_canvas feat: add Microsoft Foundry Canvas telemetry attribution Jul 24, 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread cli/azd/internal/tracing/resource/exec_environment.go
@qinezh qinezh changed the title feat: add Microsoft Foundry Canvas telemetry attribution feat: add new user agent: microsoft_foundry_canvas Jul 24, 2026

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Re-checked the rename to microsoft_foundry_canvas / Microsoft Foundry Canvas: it's applied consistently across the detector, constant, unit and functional tests, and both docs, with no leftover references to the old token. gofmt is clean, the unit test passes, and the PR description now matches the detected user agent, so the earlier mismatch is resolved.

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The new microsoft_foundry_canvas modifier follows the existing azure_app_space_portal and microsoft_foundry_skill handling in exec_environment.go. Detection, the emitted Microsoft Foundry Canvas value, unit and functional tests, and both the public telemetry reference and canonical schema are all consistent with the sibling modifiers.

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verified the new microsoft_foundry_canvas modifier against the existing azure_app_space_portal and microsoft_foundry_skill handling in exec_environment.go. Detection order, the emitted Microsoft Foundry Canvas value, the unit and functional tests, and both doc tables all line up. No code changes since my prior review of this commit.

@jongio jongio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Re-reviewed against 9b40d01. The microsoft_foundry_canvas handling mirrors the existing microsoft_foundry_skill modifier across the constant, execEnvModifiers, the unit and functional tests, and both telemetry docs. The user-agent token, emitted value, and documentation all line up, and the earlier schema-doc and naming comments are resolved.

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

Labels

customer-reported identify a customer issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Identify azd runs from Microsoft Foundry Canvas

4 participants