Azure-Samples / Azure-Samples/simple-foundry-hosted-agent-python-aigateway

Update AI Gateway monitoring to use the current OpenTelemetry configuration

Aperta
#9 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Shell
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### 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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start by locating the sample's AI Gateway exporter and Azure provisioning configuration, then trace how the workspace-based Application Insights resource and azd post-provision hook are defined. Done means the current OpenTelemetry endpoints, provider and workspace settings, managed-identity role assignment, migration behavior, and preview response caveat are represented and documented.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure
Ambito
cloud, infrastructure, observability-sre
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.