Skip to content

Commit be24c87

Browse files
committed
Adding ASP.NET custom metrics tutorial
1 parent 43ea33b commit be24c87

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed
9.94 KB
Loading

articles/azure-monitor/app/tutorial-asp-net-custom-metrics.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -111,37 +111,37 @@ To send metrics to Application Insights, you can use the `TrackMetric(..)` API.
111111

112112
4. Right-click the **AzureCafe** project in Solution Explorer and select **Publish** from the context menu.
113113

114-
![The Visual Studio Solution Explorer displays with the Azure Cafe project selected and the Publish context menu item highlighted.](./media/tutorial-asp-net-custom-metrics/web-project-publish-context-menu.png "Publish Web App")
114+
![Screenshot of the Visual Studio Solution Explorer with the Azure Cafe project selected and the Publish context menu item highlighted.](./media/tutorial-asp-net-custom-metrics/web-project-publish-context-menu.png "Publish Web App")
115115

116116
5. Select **Publish** to promote the new code to the Azure App Service.
117117

118-
![The AzureCafe publish profile displays with the Publish button highlighted.](./media/tutorial-asp-net-custom-metrics/publish-profile.png "Publish profile")
118+
![Screenshot of the Azure Cafe publish profile screen with the Publish button highlighted.](./media/tutorial-asp-net-custom-metrics/publish-profile.png "Publish profile")
119119

120120
6. Once the publish has succeeded, a new browser window opens to the Azure Cafe web application.
121121

122-
![The Azure Cafe web application displays.](./media/tutorial-asp-net-custom-metrics/azure-cafe-index.png "Azure Cafe web application")
122+
![Screenshot of the Azure Cafe web application.](./media/tutorial-asp-net-custom-metrics/azure-cafe-index.png "Azure Cafe web application")
123123

124124
7. Perform various activities in the web application to generate some telemetry.
125125

126126
1. Select **Details** next to a Cafe to view its menu and reviews.
127127

128-
![A portion of the Azure Cafe list displays with the Details button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-details-button.png "Azure Cafe Details")
128+
![Screenshot of a portion of the Azure Cafe list with the Details button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-details-button.png "Azure Cafe Details")
129129

130130
2. On the Cafe screen, select the **Reviews** tab to view and add reviews. Select the **Add review** button to add a review.
131131

132-
![The Cafe details screen displays with the Add review button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-add-review-button.png "Add review")
132+
![Screenshot of the Cafe details screen with the Add review button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-add-review-button.png "Add review")
133133

134134
3. On the Create a review dialog, enter a name, rating, comments, and upload a photo for the review. Once completed, select **Add review**.
135135

136-
![The Create a review dialog displays.](./media/tutorial-asp-net-custom-metrics/create-a-review-dialog.png "Create a review")
136+
![Screenshot of the Create a review dialog.](./media/tutorial-asp-net-custom-metrics/create-a-review-dialog.png "Create a review")
137137

138138
4. Repeat adding reviews as desired to generate more telemetry.
139139

140140
### View metrics in Application Insights
141141

142142
1. Go to the **Application Insights** resource in the [Azure portal](https://portal.azure.com).
143143

144-
![A resource group displays with the Application Insights resource highlighted.](./media/tutorial-asp-net-custom-metrics/application-insights-resource-group.png "Resource Group")
144+
:::image type="content" source="media/tutorial-asp-net-custom-metrics/application-insights-resource-group.png" alt-text="A resource group displays with the Application Insights resource highlighted." lightbox="media/tutorial-asp-net-custom-metrics/application-insights-resource-group.png":::
145145

146146
2. From the left menu of the Application Insights resource, select **Logs** from beneath the **Monitoring** section. In the **Tables** pane, double-click on the **customMetrics** table, located under the **Application Insights** tree. Modify the query to retrieve metrics for the **ReviewPerformed** custom named metric as follows, then select **Run** to filter the results.
147147

@@ -176,37 +176,37 @@ When running the sample code, you'll see that no telemetry is being sent from th
176176

177177
4. Right-click the **AzureCafe** project in Solution Explorer and select **Publish** from the context menu.
178178

179-
![The Visual Studio Solution Explorer displays with the Azure Cafe project selected and the Publish context menu item highlighted.](./media/tutorial-asp-net-custom-metrics/web-project-publish-context-menu.png "Publish Web App")
179+
![Screenshot of the Visual Studio Solution Explorer with the Azure Cafe project selected and the Publish context menu item highlighted.](./media/tutorial-asp-net-custom-metrics/web-project-publish-context-menu.png "Publish Web App")
180180

181181
5. Select **Publish** to promote the new code to the Azure App Service.
182182

183-
![The AzureCafe publish profile displays with the Publish button highlighted.](./media/tutorial-asp-net-custom-metrics/publish-profile.png "Publish profile")
183+
![Screenshot of the Azure Cafe publish profile with the Publish button highlighted.](./media/tutorial-asp-net-custom-metrics/publish-profile.png "Publish profile")
184184

185185
6. Once the publish has succeeded, a new browser window opens to the Azure Cafe web application.
186186

187-
![The Azure Cafe web application displays.](./media/tutorial-asp-net-custom-metrics/azure-cafe-index.png "Azure Cafe web application")
187+
![Screenshot of the Azure Cafe web application.](./media/tutorial-asp-net-custom-metrics/azure-cafe-index.png "Azure Cafe web application")
188188

189189
7. Perform various activities in the web application to generate some telemetry.
190190

191191
1. Select **Details** next to a Cafe to view its menu and reviews.
192192

193-
![A portion of the Azure Cafe list displays with the Details button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-details-button.png "Azure Cafe Details")
193+
![Screenshot of a portion of the Azure Cafe list with the Details button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-details-button.png "Azure Cafe Details")
194194

195195
2. On the Cafe screen, select the **Reviews** tab to view and add reviews. Select the **Add review** button to add a review.
196196

197-
![The Cafe details screen displays with the Add review button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-add-review-button.png "Add review")
197+
![Screenshot of the Cafe details with the Add review button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-add-review-button.png "Add review")
198198

199199
3. On the Create a review dialog, enter a name, rating, comments, and upload a photo for the review. Once completed, select **Add review**.
200200

201-
![The Create a review dialog displays.](./media/tutorial-asp-net-custom-metrics/create-a-review-dialog.png "Create a review")
201+
![Screenshot of the Create a review dialog displays.](./media/tutorial-asp-net-custom-metrics/create-a-review-dialog.png "Create a review")
202202

203203
4. Repeat adding reviews as desired to generate more telemetry.
204204

205205
### View metrics in Application Insights
206206

207207
1. Go to the **Application Insights** resource in the [Azure portal](https://portal.azure.com).
208208

209-
![A resource group displays with the Application Insights resource highlighted.](./media/tutorial-asp-net-custom-metrics/application-insights-resource-group.png "Resource Group")
209+
![Screenshot of a resource group with the Application Insights resource highlighted.](./media/tutorial-asp-net-custom-metrics/application-insights-resource-group.png "Resource Group")
210210

211211
2. From the left menu of the Application Insights resource, select **Logs** from beneath the **Monitoring** section. In the **Tables** pane, double-click on the **customMetrics** table, located under the **Application Insights** tree. Modify the query to retrieve metrics for the **ReviewPerformed** custom named metric as follows, then select **Run** to filter the results.
212212

@@ -276,37 +276,37 @@ Once you have made that change and send new multi-dimensional telemetry, you'll
276276

277277
5. Right-click the **AzureCafe** project in Solution Explorer and select **Publish** from the context menu.
278278

279-
![The Visual Studio Solution Explorer displays with the Azure Cafe project selected and the Publish context menu item highlighted.](./media/tutorial-asp-net-custom-metrics/web-project-publish-context-menu.png "Publish Web App")
279+
![Screenshot of the Visual Studio Solution Explorer with the Azure Cafe project selected and the Publish context menu item highlighted.](./media/tutorial-asp-net-custom-metrics/web-project-publish-context-menu.png "Publish Web App")
280280

281281
6. Select **Publish** to promote the new code to the Azure App Service.
282282

283-
![The AzureCafe publish profile displays with the Publish button highlighted.](./media/tutorial-asp-net-custom-metrics/publish-profile.png "Publish profile")
283+
![Screenshot of the Azure Cafe publish profile with the Publish button highlighted.](./media/tutorial-asp-net-custom-metrics/publish-profile.png "Publish profile")
284284

285285
7. Once the publish has succeeded, a new browser window opens to the Azure Cafe web application.
286286

287-
![The Azure Cafe web application displays.](./media/tutorial-asp-net-custom-metrics/azure-cafe-index.png "Azure Cafe web application")
287+
![Screenshot of the Azure Cafe web application.](./media/tutorial-asp-net-custom-metrics/azure-cafe-index.png "Azure Cafe web application")
288288

289289
8. Perform various activities in the web application to generate some telemetry.
290290

291291
1. Select **Details** next to a Cafe to view its menu and reviews.
292292

293-
![A portion of the Azure Cafe list displays with the Details button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-details-button.png "Azure Cafe Details")
293+
![Screenshot of a portion of the Azure Cafe list with the Details button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-details-button.png "Azure Cafe Details")
294294

295295
2. On the Cafe screen, select the **Reviews** tab to view and add reviews. Select the **Add review** button to add a review.
296296

297-
![The Cafe details screen displays with the Add review button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-add-review-button.png "Add review")
297+
![Screenshot of the Cafe details screen with the Add review button highlighted.](./media/tutorial-asp-net-custom-metrics/cafe-add-review-button.png "Add review")
298298

299299
3. On the Create a review dialog, enter a name, rating, comments, and upload a photo for the review. Once completed, select **Add review**.
300300

301-
![The Create a review dialog displays.](./media/tutorial-asp-net-custom-metrics/create-a-review-dialog.png "Create a review")
301+
![Screenshot of the Create a review dialog.](./media/tutorial-asp-net-custom-metrics/create-a-review-dialog.png "Create a review")
302302

303303
4. Repeat adding reviews as desired to generate more telemetry.
304304

305305
### View logs in Application Insights
306306

307307
1. Go to the **Application Insights** resource in the [Azure portal](https://portal.azure.com).
308308
309-
![A resource group displays with the Application Insights resource highlighted.](./media/tutorial-asp-net-custom-metrics/application-insights-resource-group.png "Resource Group")
309+
![Screenshot of a resource group with the Application Insights resource highlighted.](./media/tutorial-asp-net-custom-metrics/application-insights-resource-group.png "Resource Group")
310310

311311
2. From the left menu of the Application Insights resource, select **Logs** from beneath the **Monitoring** section. In the **Tables** pane, double-click on the **customMetrics** table, located under the **Application Insights** tree. Modify the query to retrieve metrics for the **ReviewPerformed** custom named metric as follows, then select **Run** to filter the results.
312312

@@ -337,25 +337,25 @@ Once you have made that change and send new multi-dimensional telemetry, you'll
337337

338338
1. Go to the **Application Insights** resource in the [Azure portal](https://portal.azure.com).
339339
340-
![A resource group displays with the Application Insights resource highlighted.](./media/tutorial-asp-net-custom-metrics/application-insights-resource-group.png "Resource Group")
340+
![Screenshot of a resource group with the Application Insights resource highlighted.](./media/tutorial-asp-net-custom-metrics/application-insights-resource-group.png "Resource Group")
341341

342342
2. From the left menu of the Application Insights resource, select **Metrics** from beneath the **Monitoring** section.
343343

344344
3. For **Metric Namespace**, select **azure.applicationinsights**.
345345

346-
![A metrics explorer with the Metric Namespace highlighted.](./media/tutorial-asp-net-custom-metrics/metrics-explorer-namespace.png "Metric Namespace")
346+
![Screenshot of metrics explorer with the Metric Namespace highlighted.](./media/tutorial-asp-net-custom-metrics/metrics-explorer-namespace.png "Metric Namespace")
347347

348348
4. For **Metric**, select **ReviewPerformed**.
349349

350-
![A metrics explorer with the Metric highlighted.](./media/tutorial-asp-net-custom-metrics/metrics-explorer-metric.png "Metric")
350+
![Screenshot of metrics explorer with the Metric highlighted.](./media/tutorial-asp-net-custom-metrics/metrics-explorer-metric.png "Metric")
351351

352352
5. However, you'll notice that you aren't able to split the metric by your new custom dimension, or view your custom dimension with the metrics view. Select **Apply Splitting**.
353353

354-
![Splitting support](./media/tutorial-asp-net-custom-metrics/apply-splitting.png "Splitting")
354+
![Screenshot of the Apply Splitting button.](./media/tutorial-asp-net-custom-metrics/apply-splitting.png "Splitting")
355355

356356
6. For the custom dimension **Values** to use, select **IncludesPhoto**.
357357

358-
![Splitting using a custom dimension](./media/tutorial-asp-net-custom-metrics/splitting-dimension.png "Splitting dimension")
358+
![Screenshot illustrating splitting using a custom dimension](./media/tutorial-asp-net-custom-metrics/splitting-dimension.png "Splitting dimension")
359359

360360
## Next steps
361361

0 commit comments

Comments
 (0)