An organization has deployed a set of backend microservices. You are provisioning a new Azure API Management (APIM) instance to act as a gateway for these services. You need to configure APIM to send diagnostic telemetry, including request and response details, to an Azure Application Insights instance. What should you do to configure the integration between API Management and Application Insights?
- Create an API Management logger resource that references the Application Insights instance, and then configure the diagnostics settings at the API or global level to use that logger.Answer
- BAdd the Application Insights connection string to the Application Settings of the backend App Services, as API Management automatically inherits telemetry settings from its backend services.
- CPlace a custom track-request policy containing the Application Insights instrumentation key in the inbound policy section of each API.
- DGrant the API Management system-assigned managed identity Key Vault secrets GET permissions and configure a Key Vault reference in the API Management App Settings to automatically stream Gateway logs.
Answer
Create an API Management logger resource that references the Application Insights instance, and then configure the diagnostics settings at the API or global level to use that logger.
To integrate Azure API Management with Application Insights, you must create a logger resource in API Management pointing to the Application Insights instance. Once the logger is created, you configure the API Management diagnostics settings to use the logger, which starts streaming request and response telemetry.
Step-by-Step Solution
Key Concept
API Management Integration with Application Insights