Skip to content

Commit 5c40a84

Browse files
authored
Merge pull request #287586 from MicrosoftDocs/main
Publish to live, Monday 4 AM PST, 9/30
2 parents 92064d3 + 6840c0e commit 5c40a84

File tree

80 files changed

+579
-385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+579
-385
lines changed

articles/api-management/api-management-howto-app-insights.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -375,15 +375,8 @@ To emit custom metrics, perform the following configuration steps.
375375
376376
### Limits for custom metrics
377377
378-
Azure Monitor imposes [usage limits](/azure/azure-monitor/essentials/metrics-custom-overview#quotas-and-limits) for custom metrics that may affect your ability to emit metrics from API Management. For example, Azure Monitor currently sets a limit of 10 dimension keys per metric, and a limit of 50,000 total active time series per region in a subscription (within a 12 hour period).
379-
380-
These limits have the following implications for configuring custom metrics in API Management:
381-
382-
* You can configure a maximum of 10 custom dimensions per `emit-metric` policy.
383-
384-
* The number of active time series generated by the `emit-metric` policy within a 12 hour period is the product of the number of unique values of each configured dimension during the period. For example, if three custom dimensions were configured in the policy, and each dimension had 10 possible values within the period, the `emit-metric` policy would contribute 1,000 (10 x 10 x 10) active time series.
385-
386-
* If you configure the `emit-metric` policy in multiple API Management instances that are in the same region in a subscription, all instances can contribute to the regional active time series limit.
378+
[!INCLUDE [api-management-custom-metrics-limits](../../includes/api-management-custom-metrics-limits.md)]
379+
387380
388381
## Performance implications and log sampling
389382

articles/api-management/azure-openai-emit-token-metric-policy.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,21 @@ ms.custom:
1717

1818
[!INCLUDE [api-management-availability-all-tiers](../../includes/api-management-availability-all-tiers.md)]
1919

20-
The `azure-openai-emit-token-metric` policy sends metrics to Application Insights about consumption of large language model tokens through Azure OpenAI Service APIs. Token count metrics include: Total Tokens, Prompt Tokens, and Completion Tokens.
20+
The `azure-openai-emit-token-metric` policy sends custom metrics to Application Insights about consumption of large language model tokens through Azure OpenAI Service APIs. Token count metrics include: Total Tokens, Prompt Tokens, and Completion Tokens.
2121

2222
[!INCLUDE [api-management-policy-generic-alert](../../includes/api-management-policy-generic-alert.md)]
2323

2424
[!INCLUDE [api-management-azure-openai-models](../../includes/api-management-azure-openai-models.md)]
2525

26+
## Limits for custom metrics
27+
28+
[!INCLUDE [api-management-custom-metrics-limits](../../includes/api-management-custom-metrics-limits.md)]
29+
2630

2731
## Prerequisites
2832

2933
* One or more Azure OpenAI Service APIs must be added to your API Management instance. For more information, see [Add an Azure OpenAI Service API to Azure API Management](./azure-openai-api-from-specification.md).
30-
* Your API Management instance must be integrated with Application insights. For more information, see [How to integrate Azure API Management with Azure Application Insights](./api-management-howto-app-insights.md#create-a-connection-using-the-azure-portal).
34+
* Your API Management instance must be integrated with Application insights. For more information, see [How to integrate Azure API Management with Azure Application Insights](./api-management-howto-app-insights.md).
3135
* Enable Application Insights logging for your Azure OpenAI APIs.
3236
* Enable custom metrics with dimensions in Application Insights. For more information, see [Emit custom metrics](api-management-howto-app-insights.md#emit-custom-metrics).
3337

@@ -46,7 +50,6 @@ The `azure-openai-emit-token-metric` policy sends metrics to Application Insight
4650
| Attribute | Description | Required | Default value |
4751
| --------- | -------------------------- | ------------------ | -------------- |
4852
| namespace | A string. Namespace of metric. Policy expressions aren't allowed. | No | API Management |
49-
| value | Value of metric expressed as a double. Policy expressions are allowed. | No | 1 |
5053

5154

5255
## Elements
@@ -88,15 +91,13 @@ The `azure-openai-emit-token-metric` policy sends metrics to Application Insight
8891

8992
## Example
9093

91-
The following example sends Azure OpenAI token count metrics to Application Insights along with User ID, Client IP, and API ID as dimensions.
94+
The following example sends Azure OpenAI token count metrics to Application Insights along with API ID as a custom dimension.
9295

9396
```xml
9497
<policies>
9598
<inbound>
9699
<azure-openai-emit-token-metric
97100
namespace="AzureOpenAI">
98-
<dimension name="User ID" />
99-
<dimension name="Client IP" value="@(context.Request.IpAddress)" />
100101
<dimension name="API ID" />
101102
</azure-openai-emit-token-metric>
102103
</inbound>

articles/api-management/emit-metric-policy.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: dlepow
66

77
ms.service: azure-api-management
88
ms.topic: article
9-
ms.date: 07/23/2024
9+
ms.date: 09/25/2024
1010
ms.author: danlep
1111
ms.custom: engagement-fy23
1212
---
@@ -17,12 +17,18 @@ ms.custom: engagement-fy23
1717

1818
The `emit-metric` policy sends custom metrics in the specified format to Application Insights.
1919

20-
> [!NOTE]
21-
> * Custom metrics are a [preview feature](/azure/azure-monitor/essentials/metrics-custom-overview) of Azure Monitor and subject to [limitations](/azure/azure-monitor/essentials/metrics-custom-overview#design-limitations-and-considerations).
22-
> * For more information about the API Management data added to Application Insights, see [How to integrate Azure API Management with Azure Application Insights](./api-management-howto-app-insights.md#what-data-is-added-to-application-insights).
23-
2420
[!INCLUDE [api-management-policy-generic-alert](../../includes/api-management-policy-generic-alert.md)]
2521

22+
## Limits for custom metrics
23+
24+
[!INCLUDE [api-management-custom-metrics-limits](../../includes/api-management-custom-metrics-limits.md)]
25+
26+
## Prerequisites
27+
28+
* Your API Management instance must be integrated with Application insights. For more information, see [How to integrate Azure API Management with Azure Application Insights](./api-management-howto-app-insights.md).
29+
* Enable Application Insights logging for your APIs.
30+
* Enable custom metrics with dimensions in Application Insights. For more information, see [Emit custom metrics](api-management-howto-app-insights.md#emit-custom-metrics).
31+
2632
## Policy statement
2733

2834
```xml
@@ -73,18 +79,14 @@ The `emit-metric` policy sends custom metrics in the specified format to Applica
7379

7480
* You can configure at most 10 custom dimensions for this policy.
7581

76-
* Invoking the `emit-metric` policy counts toward the usage limits for custom metrics per region in a subscription. [Learn more](api-management-howto-app-insights.md#limits-for-custom-metrics)
77-
7882
## Example
7983

80-
The following example sends a custom metric to count the number of API requests along with user ID, client IP, and API ID as custom dimensions.
84+
The following example sends a custom metric to count the number of API requests along with API ID as a custom dimension.
8185

8286
```xml
8387
<policies>
8488
<inbound>
8589
<emit-metric name="Request" value="1" namespace="my-metrics">
86-
<dimension name="User ID" />
87-
<dimension name="Client IP" value="@(context.Request.IpAddress)" />
8890
<dimension name="API ID" />
8991
</emit-metric>
9092
</inbound>

articles/api-management/llm-emit-token-metric-policy.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ms.custom:
1616

1717
[!INCLUDE [api-management-availability-all-tiers](../../includes/api-management-availability-all-tiers.md)]
1818

19-
The `llm-emit-token-metric` policy sends metrics to Application Insights about consumption of large language model (LLM) tokens through LLM APIs. Token count metrics include: Total Tokens, Prompt Tokens, and Completion Tokens.
19+
The `llm-emit-token-metric` policy sends custom metrics to Application Insights about consumption of large language model (LLM) tokens through LLM APIs. Token count metrics include: Total Tokens, Prompt Tokens, and Completion Tokens.
2020

2121
> [!NOTE]
2222
> Currently, this policy is in preview.
@@ -26,6 +26,10 @@ The `llm-emit-token-metric` policy sends metrics to Application Insights about c
2626
[!INCLUDE [api-management-llm-models](../../includes/api-management-llm-models.md)]
2727

2828

29+
## Limits for custom metrics
30+
31+
[!INCLUDE [api-management-custom-metrics-limits](../../includes/api-management-custom-metrics-limits.md)]
32+
2933
## Prerequisites
3034

3135
* One or more LLM APIs must be added to your API Management instance.
@@ -48,7 +52,6 @@ The `llm-emit-token-metric` policy sends metrics to Application Insights about c
4852
| Attribute | Description | Required | Default value |
4953
| --------- | -------------------------- | ------------------ | -------------- |
5054
| namespace | A string. Namespace of metric. Policy expressions aren't allowed. | No | API Management |
51-
| value | Value of metric expressed as a double. Policy expressions are allowed. | No | 1 |
5255

5356

5457
## Elements
@@ -89,15 +92,13 @@ The `llm-emit-token-metric` policy sends metrics to Application Insights about c
8992

9093
## Example
9194

92-
The following example sends LLM token count metrics to Application Insights along with User ID, Client IP, and API ID as dimensions.
95+
The following example sends LLM token count metrics to Application Insights along with API ID as a custom dimension.
9396

9497
```xml
9598
<policies>
9699
<inbound>
97100
<llm-emit-token-metric
98101
namespace="MyLLM">
99-
<dimension name="User ID" />
100-
<dimension name="Client IP" value="@(context.Request.IpAddress)" />
101102
<dimension name="API ID" />
102103
</llm-emit-token-metric>
103104
</inbound>

articles/azure-government/compare-azure-government-global-azure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Table below lists API endpoints in Azure vs. Azure Government for accessing and
126126
||API Management Portal|portal.azure-api.net|portal.azure-api.us||
127127
||App Configuration|azconfig.io|azconfig.azure.us||
128128
||App Service|azurewebsites.net|azurewebsites.us||
129-
||Azure AI Search|search.windows.net|search.windows.us||
129+
||Azure AI Search|search.windows.net|search.azure.us||
130130
||Azure Functions|azurewebsites.net|azurewebsites.us||
131131

132132
## Service availability

0 commit comments

Comments
 (0)