Skip to content

Add a generic host-validated extension telemetry gRPC API #9255

Description

@huimiu

Task

azd extensions currently have no governed way to contribute telemetry to azd's own command events. Add a generic, host-controlled gRPC API so an authenticated extension can report a host-validated telemetry value, and register the first field (agent.deploy.mode) so a follow-up extension change can produce it.

This is the core enablement, delivered by #9174. It does not itself emit any value.

Scope

  • New gRPC TelemetryService.AddCommandUsageAttribute(key, value); core validates against a host-owned allowlist (key, allowed values, classification, purpose, eligible commands, required capability).
  • Command-scoped storage in core so a value attaches to the owning command event (cmd.deploy / cmd.up) only, never leaking onto synthetic child spans or sibling commands.
  • Authenticated and capability-gated; invalid input rejected and never echoed into errors or logs.
  • Best-effort and backward compatible; never affects deploy; an older host returns Unimplemented.
  • Register agent.deploy.mode (code / container / byo_image) as SystemMetadata / FeatureInsight.
  • Add a generic azd.fromPackage artifact provenance marker.
  • Document the SDK API and the registered field (SDK reference and telemetry schema).

Acceptance criteria

  • An authenticated service-target-provider extension can call the API; core validates and records allowed values on the correct command event.
  • Unknown keys/values and a missing capability are rejected without recording.
  • Telemetry failure never changes deployment success, error, or output.
  • No producer required for this task: the field is registered but not yet emitted.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    ext-agentsazure.ai.agents extension

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions