Skip to content

Commit 117eaf9

Browse files
Updated Application Insights section from WAF collaborative work, cleaned up extra lines in article.
1 parent 6511794 commit 117eaf9

File tree

2 files changed

+35
-31
lines changed

2 files changed

+35
-31
lines changed

articles/azure-monitor/best-practices-cost.md

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ description: Recommendations for reducing costs in Azure Monitor.
44
ms.topic: conceptual
55
author: bwren
66
ms.author: bwren
7-
ms.date: 08/03/2023
7+
ms.date: 03/12/2024
88
ms.reviewer: bwren
99
---
1010

1111
# Cost optimization in Azure Monitor
12+
1213
Cost optimization refers to ways to reduce unnecessary expenses and improve operational efficiencies. You can significantly reduce your cost for Azure Monitor by understanding your different configuration options and opportunities to reduce the amount of data that it collects. Before you use this article, you should see [Azure Monitor cost and usage](cost-usage.md) to understand the different ways that Azure Monitor charges and how to view your monthly bill.
1314

1415
This article describes [Cost optimization](/azure/architecture/framework/cost/) for Azure Monitor as part of the [Azure Well-Architected Framework](/azure/architecture/framework/). This is a set of guiding tenets that can be used to improve the quality of a workload. The framework consists of five pillars of architectural excellence:
@@ -19,21 +20,17 @@ This article describes [Cost optimization](/azure/architecture/framework/cost/)
1920
- Operational Excellence
2021
- Performance Efficiency
2122

22-
2323
## Azure Monitor Logs
2424

2525
[!INCLUDE [waf-logs-cost](includes/waf-logs-cost.md)]
2626

27-
2827
## Azure resources
2928

30-
3129
### Design checklist
3230

3331
> [!div class="checklist"]
3432
> - Collect only critical resource log data from Azure resources.
3533
36-
3734
### Configuration recommendations
3835

3936
| Recommendation | Benefit |
@@ -44,42 +41,17 @@ This article describes [Cost optimization](/azure/architecture/framework/cost/)
4441

4542
[!INCLUDE [waf-containers-cost](includes/waf-alerts-cost.md)]
4643

47-
4844
## Virtual machines
4945

5046
[!INCLUDE [waf-vm-cost](includes/waf-vm-cost.md)]
5147

5248
## Containers
5349

54-
5550
[!INCLUDE [waf-containers-cost](includes/waf-containers-cost.md)]
5651

57-
58-
5952
## Application Insights
6053

61-
### Design checklist
62-
63-
> [!div class="checklist"]
64-
> - Change to Workspace-based Application Insights.
65-
> - Use sampling to tune the amount of data collected.
66-
> - Limit the number of Ajax calls.
67-
> - Disable unneeded modules.
68-
> - Pre-aggregate metrics from any calls to TrackMetric.
69-
> - Limit the use of custom metrics.
70-
> - Ensure use of updated SDKs.
71-
72-
### Configuration recommendations
73-
74-
| Recommendation | Benefit |
75-
|:---|:---|
76-
| Change to Workspace-based Application Insights | Ensure that your Application Insights resources are [Workspace-based](app/create-workspace-resource.md) so that they can leverage new cost savings tools such as [Basic Logs](logs/basic-logs-configure.md), [Commitment Tiers](logs/cost-logs.md#commitment-tiers), [Retention by data type and Data Archive](logs/data-retention-archive.md#configure-retention-and-archive-at-the-table-level). |
77-
| Use sampling to tune the amount of data collected. | [Sampling](app/sampling.md) is the primary tool you can use to tune the amount of data collected by Application Insights. Use sampling to reduce the amount of telemetry that's sent from your applications with minimal distortion of metrics. |
78-
| Limit the number of Ajax calls. | [Limit the number of Ajax calls](app/javascript.md#configuration) that can be reported in every page view or disable Ajax reporting. If you disable Ajax calls, you'll be disabling [JavaScript correlation](app/javascript.md#enable-distributed-tracing) too. |
79-
| Disable unneeded modules. | [Edit ApplicationInsights.config](app/configuration-with-applicationinsights-config.md) to turn off collection modules that you don't need. For example, you might decide that performance counters or dependency data aren't required. |
80-
| Pre-aggregate metrics from any calls to TrackMetric. | If you put calls to TrackMetric in your application, you can reduce traffic by using the overload that accepts your calculation of the average and standard deviation of a batch of measurements. Alternatively, you can use a [pre-aggregating package](https://www.myget.org/gallery/applicationinsights-sdk-labs). |
81-
| Limit the use of custom metrics. | The Application Insights option to [Enable alerting on custom metric dimensions](app/pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-pre-aggregation) can increase costs. Using this option can result in the creation of more pre-aggregation metrics. |
82-
| Ensure use of updated SDKs. | Earlier versions of the ASP.NET Core SDK and Worker Service SDK [collect many counters by default](app/eventcounters.md#default-counters-collected), which were collected as custom metrics. Use later versions to specify [only required counters](app/eventcounters.md#customizing-counters-to-be-collected). |
54+
[!INCLUDE [waf-application-insights-cost](includes/waf-application-insights-cost.md)]
8355

8456
## Frequently asked questions
8557

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
author: KennedyDenMSFT
3+
ms.author: aaronmax
4+
ms.service: azure-monitor
5+
ms.topic: include
6+
ms.date: 03/12/2024
7+
---
8+
9+
### Design checklist
10+
11+
> [!div class="checklist"]
12+
> - Change to workspace-based Application Insights.
13+
> - Use sampling to tune the amount of data collected.
14+
> - Limit the number of Ajax calls.
15+
> - Disable unneeded modules.
16+
> - Pre-aggregate metrics from any calls to TrackMetric.
17+
> - Limit the use of custom metrics where possible.
18+
> - Ensure use of updated SDKs.
19+
> - Limit unwanted host trace and general trace logging using log levels.
20+
21+
### Configuration recommendations
22+
23+
| Recommendation | Benefit |
24+
|:---------------|:--------|
25+
| Change to workspace-based Application Insights. | Ensure that your Application Insights resources are [workspace-based](../app/create-workspace-resource.md) so that they can apply new cost savings tools such as [Basic Logs](../logs/basic-logs-configure.md), [commitment tiers](../logs/cost-logs.md#commitment-tiers), and [retention by data type and data archive](../logs/data-retention-archive.md#configure-retention-and-archive-at-the-table-level). |
26+
| Use sampling to tune the amount of data collected. | [Sampling](../app/sampling.md) is the primary tool you can use to tune the amount of data collected by Application Insights. Use sampling to reduce the amount of telemetry sent from your applications with minimal distortion of metrics. |
27+
| Limit the number of Ajax calls. | [Limit the number of Ajax calls](../app/javascript.md#configuration) that can be reported in every page view or disable Ajax reporting. If you disable Ajax calls, you also disable [JavaScript correlation](../app/javascript.md#enable-distributed-tracing). |
28+
| Disable unneeded modules. | [Edit ApplicationInsights.config](../app/configuration-with-applicationinsights-config.md) to turn off collection modules that you don't need. For example, you might decide that performance counters or dependency data aren't required. |
29+
| Pre-aggregate metrics from any calls to TrackMetric. | If you put calls to TrackMetric in your application, you can reduce traffic by using the overload that accepts your calculation of the average and standard deviation of a batch of measurements. Alternatively, you can use a [pre-aggregating package](https://www.myget.org/gallery/applicationinsights-sdk-labs). |
30+
| Limit the use of custom metrics. | The Application Insights option to [Enable alerting on custom metric dimensions](../app/pre-aggregated-metrics-log-metrics.md#custom-metrics-dimensions-and-pre-aggregation) can increase costs. Using this option can result in the creation of more pre-aggregation metrics. |
31+
| Ensure use of updated SDKs. | Earlier versions of the ASP.NET Core SDK and Worker Service SDK [collect many counters by default](../app/eventcounters.md#default-counters-collected), which were collected as custom metrics. Use later versions to specify [only required counters](../app/eventcounters.md#customizing-counters-to-be-collected). |
32+
| Limit unwanted trace logging. | Application Insights has several possible [log sources](../app/app-insights-overview.md#logging-frameworks). Log levels can be used to tune and reduce trace log telemetry. Logging can also apply to the host. For example, customers using Azure Kubernetes Service (AKS) should adjust [control plane and data plane logs](../../aks/monitor-aks.md#logs) and customers using Azure functions should [adapt log levels and scope](../../azure-functions/configure-monitoring.md) to optimize log volume and costs. |

0 commit comments

Comments
 (0)