Skip to content

Update AI Gateway monitoring to use the current OpenTelemetry configuration #9

Open

Description

Problem

The sample currently configures telemetryExporters with kind: applicationInsights and an Application Insights connection string. The current AI Gateway monitoring experience expects the native OTLP/OpenTelemetry configuration, so the portal does not reliably recognize this legacy exporter as monitoring-enabled.

Missing configuration

  • Register the Microsoft.Monitor resource provider.
  • Set AzureMonitorWorkspaceIngestionMode: Enabled on the workspace-based Application Insights resource.
  • Wait for Application Insights to generate its managed DCR/DCE and OTLP endpoints.
  • Configure the exporter with kind: OpenTelemetry, the Application Insights resource ID, metrics/logs/traces OTLP endpoints, and managed-identity audience https://monitor.azure.com.
  • Assign the AI Gateway system-assigned identity the Monitoring Metrics Publisher role (3913510d-42f4-4e42-8a64-420c390055eb) at the generated DCR scope.
  • Account for the deny assignment on the generated managed resource group: a nested ARM/Bicep role assignment is blocked, while a direct role-assignment PUT from an azd post-provision hook works.
  • Document that exporter kind is immutable, requiring delete/recreate when migrating an existing legacy exporter.

Current preview behavior

The service currently persists metrics and logs endpoints but may omit a supplied tracesEndpoint from exporter GET responses. Metrics and logs are sufficient for the portal dashboard eligibility check.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions