Skip to content

Commit 4a9afe0

Browse files
committed
re arrange
1 parent 6abffc2 commit 4a9afe0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -182,23 +182,11 @@ However, you will notice that you aren't able to split the metric by your new cu
182182

183183
![Splitting support](./media/get-metric/splitting-support.png)
184184

185-
By default multi-dimensional metrics within the Metric explorer experience are not turned on in Application Insights resources. To turn on this behavior follow [this](#enable-multi-dimensional-metrics).
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]");
194-
MetricIdentifier id = new MetricIdentifier("CustomMetricNamespace","ComputerSold", "FormFactor", "GraphicsCard", "MemorySpeed", "BatteryCapacity", "StorageCapacity");
195-
Metric computersSold = _telemetryClient.GetMetric(id);
196-
computersSold.TrackValue(110,"Laptop", "Nvidia", "DDR4", "39Wh", "1TB");
197-
```
185+
By default multi-dimensional metrics within the Metric explorer experience are not turned on in Application Insights resources.
198186

199187
### Enable multi-dimensional metrics
200188

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).
202190

203191
Once you have made that change and send new multi-dimensional telemetry, you will be able to **Apply splitting**.
204192

@@ -211,6 +199,18 @@ And view your metric aggregations for each _FormFactor_ dimension:
211199

212200
![Form factors](./media/get-metric/formfactor.png)
213201

202+
### How to use MetricIdentifier when there are more than three dimensions
203+
204+
Currently 10 dimensions are supported however, greater than three dimensions requires the use of `MetricIdentifier`:
205+
206+
```csharp
207+
// Add "using Microsoft.ApplicationInsights.Metrics;" to use MetricIdentifier
208+
// MetricIdentifier id = new MetricIdentifier("[metricNamespace]","[metricId],"[dim1]","[dim2]","[dim3]","[dim4]","[dim5]");
209+
MetricIdentifier id = new MetricIdentifier("CustomMetricNamespace","ComputerSold", "FormFactor", "GraphicsCard", "MemorySpeed", "BatteryCapacity", "StorageCapacity");
210+
Metric computersSold = _telemetryClient.GetMetric(id);
211+
computersSold.TrackValue(110,"Laptop", "Nvidia", "DDR4", "39Wh", "1TB");
212+
```
213+
214214
## Custom metric configuration
215215

216216
If you want to alter the metric configuration, you need to do this in the place where the metric is initialized.

0 commit comments

Comments
 (0)