You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/get-metric.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The Azure Monitor Application Insights .NET and .NET Core SDKs have two differen
15
15
16
16
## TrackMetric versus GetMetric
17
17
18
-
`TrackMetric()` sends raw telemetry denoting a metric. It is inefficient to send a single telemetry item for each value. `TrackMetric()`sends raw telemetry denoting a metric. It is inefficient to send a single telemetry item for each value. `TrackMetric()`is also inefficient in terms of performance since every `TrackMetric(item)` goes through the full SDK pipeline of telemetry initializers and processors. Unlike `TrackMetric()`, `GetMetric()` handles local pre-aggregation for you and then only submits an aggregated summary metric at a fixed interval of one minute. So 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 also greatly reduces the risk of throttling occurring since the total number of telemetry items that need to be sent for an aggregated metric are greatly reduced.
18
+
`TrackMetric()` sends raw telemetry denoting a metric. It is inefficient to send a single telemetry item for each value. `TrackMetric()` is also inefficient in terms of performance since every `TrackMetric(item)` goes through the full SDK pipeline of telemetry initializers and processors. Unlike `TrackMetric()`, `GetMetric()` handles local pre-aggregation for you and then only submits an aggregated summary metric at a fixed interval of one minute. So 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 also greatly reduces the risk of throttling occurring since the total number of telemetry items that need to be sent for an aggregated metric are greatly reduced.
19
19
20
20
In Application Insights, custom metrics collected via `TrackMetric()` and `GetMetric()` are not subject to [sampling](https://docs.microsoft.com/azure/azure-monitor/app/sampling). Sampling important metrics can lead to scenarios where alerting you may 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 will fire. But since custom metrics aren't sampled, there are some potential concerns.
21
21
@@ -182,23 +182,11 @@ However, you will notice that you aren't able to split the metric by your new cu
By default multi-dimensional metrics within the Metric explorer experience are not turned on in Application Insights resources. To turn on this behavior go to the usage and estimated cost tab by checking ["Enable alerting on custom metric dimensions"](pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-pre-aggregation).
186
-
187
-
### How to use MetricIdentifier when there are more than three dimensions
188
-
189
-
Currently 10 dimensions are supported however, greater than three dimensions requires the use of `MetricIdentifier`:
190
-
191
-
```csharp
192
-
// Add "using Microsoft.ApplicationInsights.Metrics;" to use MetricIdentifier
193
-
// MetricIdentifier id = new MetricIdentifier("[metricNamespace]","[metricId],"[dim1]","[dim2]","[dim3]","[dim4]","[dim5]");
By default multi-dimensional metrics within the Metric explorer experience are not turned on in Application Insights resources.
198
186
199
187
### Enable multi-dimensional metrics
200
188
201
-
To enable multi-dimensional metrics for an Application Insights resource, Select **Usage and estimated costs** > **Custom Metrics** > **Enable alerting on custom metric dimensions** > **OK**.
189
+
To enable multi-dimensional metrics for an Application Insights resource, Select **Usage and estimated costs** > **Custom Metrics** > **Enable alerting on custom metric dimensions** > **OK**. More details about this can be found [here](pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-pre-aggregation).
202
190
203
191
Once you have made that change and send new multi-dimensional telemetry, you will be able to **Apply splitting**.
204
192
@@ -211,6 +199,18 @@ And view your metric aggregations for each _FormFactor_ dimension:
0 commit comments