Repository navigation
Port FeatureUsage tracking and .NET behavioral tests - #1269
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Default-on, process-wide telemetry and HTTP emission boundaries warrant human verification alongside the unresolved correctness issues.
2 open findings
What changed in this PR
Adds process-wide feature tracking to the Go SDK, with .NET-aligned indexes and restricted User-Agent emission.
Changes:
- Tracks capability activation across agents, providers, tools, and workflows.
- Adds approved-origin emission, opt-outs, and provider lifecycle fixes.
- Adds behavioral tests, 36 catalog pairings, and telemetry documentation.
| File | Description |
|---|---|
| workflow/builder.go | Records successful workflow builds. |
| workflow/agentworkflow/sequential.go | Tracks sequential orchestration. |
| workflow/agentworkflow/groupchat.go | Tracks group-chat orchestration. |
| workflow/agentworkflow/concurrent.go | Tracks concurrent orchestration. |
| tool/shelltool/localshell.go | Tracks shell execution and initialization. |
| tool/shelltool/environment.go | Tracks environment-provider participation. |
| tool/mcptool/mcp.go | Tracks MCP operations. |
| README.md | Explains telemetry and opt-outs. |
| provider/openaiprovider/responses.go | Tracks Responses usage and applies emission policy. |
| provider/openaiprovider/chat.go | Applies adapter-specific emission policy. |
| provider/foundryprovider/memory.go | Tracks memory-provider participation. |
| provider/foundryprovider/clientheaders.go | Defers activation until enumeration. |
| provider/foundryprovider/agent.go | Distinguishes server-agent targets. |
| provider/copilotprovider/copilot.go | Tracks usage before cancellation handling. |
| provider/anthropicprovider/agent.go | Tracks usage and handles empty streams. |
| provider/aguiprovider/hosting.go | Tracks AG-UI hosting. |
| provider/a2aprovider/handler.go | Tracks A2A request handling. |
| provider/a2aprovider/executor.go | Tracks A2A executor operations. |
| provider/a2aprovider/a2a.go | Tracks A2A client usage. |
| provider/a2aprovider/a2a_test.go | Tests activation and cold streams. |
| internal/telemetry/telemetry_test.go | Tests masks, headers, origins, and opt-outs. |
| internal/telemetry/featureusage.go | Implements accumulation and header emission. |
| internal/telemetry/featureusage_internal_test.go | Tests caching and Foundry policies. |
| internal/telemetry/featureusage_activation_test.go | Tests activation and adapter boundaries. |
| docs/feature-usage-telemetry.md | Documents registry and emission controls. |
| agent/skills/provider.go | Tracks skills providers and in-memory sources. |
| agent/skills/fsskills/source.go | Tracks file-backed skill discovery. |
| agent/history.go | Tracks in-memory history participation. |
| agent/harness/toolapproval/toolapproval.go | Tracks approval middleware. |
| agent/harness/todo/todo.go | Tracks todo-provider participation. |
| agent/harness/agentmode/agentmode.go | Tracks agent-mode participation. |
| agent/compaction/provider.go | Tracks context compaction. |
| agent/compaction/historyprovider.go | Tracks history compaction. |
| agent/agent.go | Tracks agent invocation. |
| _catalog/dotnet-go-sdk-symbol-mapping.json | Records behavioral-test pairings. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Default-on telemetry crosses provider emission boundaries and concurrent execution paths, warranting human validation, especially without race-detector coverage.
0 open findings
2 resolved since last review
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
API consistency review
Changed Go contract
Upstream evidence reviewed
AssessmentThis PR is a direct, well-evidenced port of the .NET Warning Firewall blocked 4 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "github.com"
- "proxy.golang.org"
- "storage.googleapis.com"
- "sum.golang.org"See Network Configuration for more information.
|

Summary
Parity fixes covered by the ports
Validation
go vetand change-scoped golangci-lint v2.14.0 passed;git diff --checkpassed.Race detection is unsupported on the validation host (Windows ARM64). Full lint still reports unrelated pre-existing issues; change-scoped lint is clean.