|
1 | 1 | ---
|
2 | 2 | title: Monitor Azure API Management
|
3 | 3 | description: Learn how to monitor Azure API Management using Azure Monitor, including data collection, analysis, and alerting.
|
4 |
| -ms.date: 05/14/2025 |
| 4 | +ms.date: 07/09/2025 |
5 | 5 | ms.custom:
|
6 | 6 | - horz-monitor
|
7 | 7 | - build-2025
|
@@ -49,27 +49,31 @@ Azure API Management provides analytics for your APIs so that you can analyze th
|
49 | 49 |
|
50 | 50 | With API analytics, analyze the usage and performance of the APIs in your API Management instance across several dimensions, including:
|
51 | 51 |
|
52 |
| -- Time |
| 52 | +- Timeline |
53 | 53 | - Geography
|
54 | 54 | - APIs
|
55 | 55 | - API operations
|
56 | 56 | - Products
|
57 | 57 | - Subscriptions
|
58 | 58 | - Users
|
59 | 59 | - Requests
|
| 60 | +- Language models (for large language model APIs) |
60 | 61 |
|
61 | 62 | API analytics provides data on requests, including failed and unauthorized requests. Geography values are based on IP address mapping. There can be a delay in the availability of analytics data.
|
62 | 63 |
|
63 | 64 | #### Azure Monitor-based dashboard
|
64 | 65 |
|
65 | 66 | To use the Azure Monitor-based dashboard, you need a Log Analytics workspace as a data source for API Management gateway logs.
|
66 | 67 |
|
67 |
| -If you need to configure one, the following are brief steps to send gateway logs to a Log Analytics workspace. For more information, see [Tutorial: Monitor published APIs](api-management-howto-use-azure-monitor.md#resource-logs). This procedure is a one-time setup. |
| 68 | +If you need to configure one, the following are brief steps to send gateway logs to a Log Analytics workspace. For more information, see [Enable diagnostic setting for Azure Monitor logs](#enable-diagnostic-setting-for-azure-monitor-logs), later in this article. This procedure is a one-time setup. |
68 | 69 |
|
69 | 70 | 1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
|
70 | 71 | 1. In the left-hand menu, under **Monitoring**, select **Diagnostic settings** > **+ Add diagnostic setting**.
|
71 | 72 | 1. Enter a descriptive name for the diagnostic setting.
|
72 | 73 | 1. In **Logs**, select **Logs related to ApiManagement Gateway**.
|
| 74 | + > [!TIP] |
| 75 | + > To collect logs for large language model (LLM) APIs for display on the Azure Monitor-based dashboard, also select **Logs related to generative AI gateway**. |
| 76 | +
|
73 | 77 | 1. In **Destination details**, select **Send to Log Analytics** and select a Log Analytics workspace in the same or a different subscription. If you need to create a workspace, see [Create a Log Analytics workspace](/azure/azure-monitor/logs/quick-create-workspace).
|
74 | 78 | 1. Make sure **Resource specific** is selected as the destination table.
|
75 | 79 | 1. Select **Save**.
|
@@ -111,7 +115,7 @@ This section shows you how to enable Azure Monitor logs for auditing and trouble
|
111 | 115 | |API Management gateway | Requests processed by the API Management gateway, including HTTP methods, protocols, request and response bodies, headers, timings, error details, and cache involvement. | Adjust settings for all APIs, or override them for individual APIs.<br/><br/>In API Management instances configured with [workspaces](workspaces-overview.md), gateway logs can be collected individually for each workspace and aggregated for centralized access by the platform team. |
|
112 | 116 | |WebSocket connections | Events for [WebSocket API](websocket-api.md) connections, starting from the handshake until the connection is terminated. |
|
113 | 117 | |Developer portal usage | Requests that are received and processed by the API Management [developer portal](developer-portal-overview.md), including user authentication actions, views of API details, and API testing in the interactive test console.|
|
114 |
| -| Generative AI gateway | Requests processed by the API Management gateway for large language model (LLM) REST APIs such as Azure OpenAI APIs, including token usage, models, and optionally details of request prompts and response completions. | Enable logging of request messages and/or response messages for specific LLM APIs. |
| 118 | +| Generative AI gateway | Requests processed by the API Management gateway for large language model (LLM) REST APIs such as Azure AI Foundry APIs, including token usage, models, and optionally details of request prompts and response completions. | Enable logging of request messages and/or response messages for specific LLM APIs. |
115 | 119 |
|
116 | 120 | For more information, see [API Management monitoring data reference](monitor-api-management-reference.md).
|
117 | 121 |
|
|
0 commit comments