Skip to content

Commit 8d75dfc

Browse files
authored
Merge pull request #278434 from kainawroth/patch-1
Remove "preview" tagging from standard metrics
2 parents 7f1ae32 + 933ac12 commit 8d75dfc

File tree

10 files changed

+55
-55
lines changed

10 files changed

+55
-55
lines changed

articles/azure-monitor/alerts/alerts-troubleshoot-metric.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ If you want to alert on [specific dimension values of a metric](./alerts-metric-
148148
- The displayed dimension values are based on metric data collected in the last day.
149149
- If the dimension value isn't yet emitted or isn't shown, you can use the **Add custom value** option to add a custom dimension value.
150150
- If you want to alert on all possible values of a dimension and even include future values, choose the **Select all current and future values** option.
151-
- Custom metrics dimensions of Application Insights resources are turned off by default. To turn on the collection of dimensions for these custom metrics, see [Log-based and pre-aggregated metrics in Application Insights](../app/pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-pre-aggregation).
151+
- Custom metrics dimensions of Application Insights resources are turned off by default. To turn on the collection of dimensions for these custom metrics, see [Log-based and preaggregated metrics in Application Insights](../app/pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-preaggregation).
152152

153153
### You want to configure an alert rule on a custom metric that isn't emitted yet
154154

articles/azure-monitor/app/get-metric.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Get-Metric in Azure Monitor Application Insights
3-
description: Learn how to effectively use the GetMetric() call to capture locally pre-aggregated metrics for .NET and .NET Core applications with Azure Monitor Application Insights.
3+
description: Learn how to effectively use the GetMetric() call to capture locally preaggregated metrics for .NET and .NET Core applications with Azure Monitor Application Insights.
44
ms.service: azure-monitor
55
ms.topic: conceptual
66
ms.date: 01/31/2024
@@ -11,15 +11,15 @@ ms.reviewer: mmcc
1111

1212
# Custom metric collection in .NET and .NET Core
1313

14-
The Azure Monitor Application Insights .NET and .NET Core SDKs have two different methods of collecting custom metrics: `TrackMetric()` and `GetMetric()`. The key difference between these two methods is local aggregation. The `TrackMetric()` method lacks pre-aggregation. The `GetMetric()` method has pre-aggregation. We recommend that you use aggregation, so `TrackMetric()` is no longer the preferred method of collecting custom metrics. This article walks you through using the `GetMetric()` method and some of the rationale behind how it works.
14+
The Azure Monitor Application Insights .NET and .NET Core SDKs have two different methods of collecting custom metrics: `TrackMetric()` and `GetMetric()`. The key difference between these two methods is local aggregation. The `TrackMetric()` method lacks preaggregation. The `GetMetric()` method has preaggregation. We recommend that you use aggregation, so `TrackMetric()` is no longer the preferred method of collecting custom metrics. This article walks you through using the `GetMetric()` method and some of the rationale behind how it works.
1515

1616
[!INCLUDE [azure-monitor-app-insights-otel-available-notification](../includes/azure-monitor-app-insights-otel-available-notification.md)]
1717

18-
## Pre-aggregating vs. non-pre-aggregating API
18+
## Preaggregating vs. non-preaggregating API
1919

2020
The `TrackMetric()` method sends raw telemetry denoting a metric. It's inefficient to send a single telemetry item for each value. The `TrackMetric()` method is also inefficient in terms of performance because every `TrackMetric(item)` goes through the full SDK pipeline of telemetry initializers and processors.
2121

22-
Unlike `TrackMetric()`, `GetMetric()` handles local pre-aggregation for you and then only submits an aggregated summary metric at a fixed interval of one minute. If you need to closely monitor some custom metric at the second or even millisecond level, you can do so while only incurring the storage and network traffic cost of only monitoring every minute. This behavior also greatly reduces the risk of throttling occurring because the total number of telemetry items that need to be sent for an aggregated metric are greatly reduced.
22+
Unlike `TrackMetric()`, `GetMetric()` handles local preaggregation for you and then only submits an aggregated summary metric at a fixed interval of one minute. If you need to closely monitor some custom metric at the second or even millisecond level, you can do so while only incurring the storage and network traffic cost of only monitoring every minute. This behavior also greatly reduces the risk of throttling occurring because the total number of telemetry items that need to be sent for an aggregated metric are greatly reduced.
2323

2424
In Application Insights, custom metrics collected via `TrackMetric()` and `GetMetric()` aren't subject to [sampling](./sampling.md). Sampling important metrics can lead to scenarios where alerting you might have built around those metrics could become unreliable. By never sampling your custom metrics, you can generally be confident that when your alert thresholds are breached, an alert fires. Because custom metrics aren't sampled, there are some potential concerns.
2525

@@ -29,9 +29,9 @@ Trend tracking in a metric every second, or at an even more granular interval, c
2929
- **Increased network traffic or performance overhead.** In some scenarios, this overhead could have both a monetary and application performance cost.
3030
- **Risk of ingestion throttling.** Azure Monitor drops ("throttles") data points when your app sends a high rate of telemetry in a short time interval.
3131

32-
Throttling is a concern because it can lead to missed alerts. The condition to trigger an alert could occur locally and then be dropped at the ingestion endpoint because of too much data being sent. We don't recommend using `TrackMetric()` for .NET and .NET Core unless you've implemented your own local aggregation logic. If you're trying to track every instance an event occurs over a given time period, you might find that [`TrackEvent()`](./api-custom-events-metrics.md#trackevent) is a better fit. Keep in mind that unlike custom metrics, custom events are subject to sampling. You can still use `TrackMetric()` even without writing your own local pre-aggregation. But if you do so, be aware of the pitfalls.
32+
Throttling is a concern because it can lead to missed alerts. The condition to trigger an alert could occur locally and then be dropped at the ingestion endpoint because of too much data being sent. We don't recommend using `TrackMetric()` for .NET and .NET Core unless you've implemented your own local aggregation logic. If you're trying to track every instance an event occurs over a given time period, you might find that [`TrackEvent()`](./api-custom-events-metrics.md#trackevent) is a better fit. Keep in mind that unlike custom metrics, custom events are subject to sampling. You can still use `TrackMetric()` even without writing your own local preaggregation. But if you do so, be aware of the pitfalls.
3333

34-
In summary, we recommend `GetMetric()` because it does pre-aggregation, it accumulates values from all the `Track()` calls, and sends a summary/aggregate once every minute. The `GetMetric()` method can significantly reduce the cost and performance overhead by sending fewer data points while still collecting all relevant information.
34+
In summary, we recommend `GetMetric()` because it does preaggregation, it accumulates values from all the `Track()` calls, and sends a summary/aggregate once every minute. The `GetMetric()` method can significantly reduce the cost and performance overhead by sending fewer data points while still collecting all relevant information.
3535

3636
> [!NOTE]
3737
> Only the .NET and .NET Core SDKs have a `GetMetric()` method. If you're using Java, see [Sending custom metrics using micrometer](./java-standalone-config.md#autocollected-micrometer-metrics-including-spring-boot-actuator-metrics). For JavaScript and Node.js, you would still use `TrackMetric()`, but keep in mind the caveats that were outlined in the previous section. For Python, you can use [OpenCensus.stats](/previous-versions/azure/azure-monitor/app/opencensus-python#metrics) to send custom metrics, but the metrics implementation is different.
@@ -194,7 +194,7 @@ By default, multidimensional metrics within the metric explorer aren't turned on
194194

195195
### Enable multidimensional metrics
196196

197-
To enable multidimensional metrics for an Application Insights resource, select **Usage and estimated costs** > **Custom Metrics** > **Enable alerting on custom metric dimensions** > **OK**. For more information, see [Custom metrics dimensions and pre-aggregation](pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-pre-aggregation).
197+
To enable multidimensional metrics for an Application Insights resource, select **Usage and estimated costs** > **Custom Metrics** > **Enable alerting on custom metric dimensions** > **OK**. For more information, see [Custom metrics dimensions and preaggregation](pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-preaggregation).
198198

199199
After you've made that change and sent new multidimensional telemetry, you can select **Apply splitting**.
200200

@@ -312,7 +312,7 @@ SeverityLevel.Error);
312312
* [Metrics - Get - REST API](/rest/api/application-insights/metrics/get)
313313
* [Application Insights API for custom events and metrics](api-custom-events-metrics.md)
314314
* [Learn more](./worker-service.md) about monitoring worker service applications.
315-
* Use [log-based and pre-aggregated metrics](./pre-aggregated-metrics-log-metrics.md).
315+
* Use [log-based and preaggregated metrics](./pre-aggregated-metrics-log-metrics.md).
316316
* Analyze metrics with [metrics explorer](../essentials/analyze-metrics.md).
317317
* Learn how to enable Application Insights for [ASP.NET Core applications](asp-net-core.md).
318318
* Learn how to enable Application Insights for [ASP.NET applications](asp-net.md).
166 KB
Loading

articles/azure-monitor/app/opentelemetry-add-modify.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Telemetry emitted by Azure SDKS is automatically [collected](https://github.com/
226226
> The Azure Monitor OpenTelemetry Distros include custom mapping and logic to automatically emit [Application Insights standard metrics](standard-metrics.md).
227227
228228
> [!TIP]
229-
> All OpenTelemetry metrics whether automatically collected from instrumentation libraries or manual collected from custom coding are currently considered Application Insights "custom metrics" for billing purposes. [Learn More](pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-pre-aggregation).
229+
> All OpenTelemetry metrics whether automatically collected from instrumentation libraries or manually collected from custom coding are currently considered Application Insights "custom metrics" for billing purposes. [Learn more](pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-preaggregation).
230230
231231
### Add a community instrumentation library
232232

0 commit comments

Comments
 (0)