Skip to content

Commit 1eb3ad5

Browse files
authored
Merge pull request #268794 from KennedyDenMSFT/US226343
Updated Application Insights section from WAF collaborative work
2 parents 4a8191e + 3b379f9 commit 1eb3ad5

File tree

2 files changed

+40
-36
lines changed

2 files changed

+40
-36
lines changed

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

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,82 +4,54 @@ 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

14-
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:
15+
This article describes [Cost optimization](/azure/architecture/framework/cost/) for Azure Monitor as part of the [Azure Well-Architected Framework](/azure/architecture/framework/). The Azure Well-Architected Framework 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:
1516

1617
- Reliability
1718
- Security
1819
- Cost Optimization
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 |
4037
|:---|:---|
41-
| Collect only critical resource log data from Azure resources. | When you create [diagnostic settings](essentials/diagnostic-settings.md) to send [resource logs](essentials/resource-logs.md) for your Azure resources to a Log Analytics database, only specify those categories that you require. Since diagnostic settings don't allow granular filtering of resource logs, you can use a [workspace transformation](essentials/data-collection-transformations.md?#workspace-transformation-dcr) to further filter unneeded data for those resources that use a [supported table](logs/tables-feature-support.md). See [Diagnostic settings in Azure Monitor](essentials/diagnostic-settings.md#controlling-costs) for details on how to configure diagnostic settings and using transformations to filter their data. |
38+
| Collect only critical resource log data from Azure resources. | When you create [diagnostic settings](essentials/diagnostic-settings.md) to send [resource logs](essentials/resource-logs.md) for your Azure resources to a Log Analytics database, only specify those categories that you require. Since diagnostic settings don't allow granular filtering of resource logs, you can use a [workspace transformation](essentials/data-collection-transformations.md?#workspace-transformation-dcr) to filter unneeded data for those resources that use a [supported table](logs/tables-feature-support.md). See [Diagnostic settings in Azure Monitor](essentials/diagnostic-settings.md#controlling-costs) for details on how to configure diagnostic settings and using transformations to filter their data. |
4239

4340
## Alerts
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

@@ -89,7 +61,7 @@ This section provides answers to common questions.
8961

9062
Yes, for experimental use. In the basic pricing plan, your application can send a certain allowance of data each month free of charge. The free allowance is large enough to cover development and publishing an app for a few users. You can set a cap to prevent more than a specified amount of data from being processed.
9163

92-
Larger volumes of telemetry are charged by the gigabyte. We provide some tips on how to [limit your charges](#application-insights).
64+
Larger volumes of telemetry are charged per gigabyte. We provide some tips on how to [limit your charges](#application-insights).
9365

9466
The Enterprise plan incurs a charge for each day that each web server node sends telemetry. It's suitable if you want to use Continuous Export on a large scale.
9567

@@ -111,9 +83,9 @@ Read the [pricing plan](https://azure.microsoft.com/pricing/details/application-
11183

11284
This answer depends on the distribution of our endpoints, *not* on where your Application Insights resource is hosted.
11385

114-
### Will I incur network costs if my Application Insights resource is monitoring an Azure resource (i.e., telemetry producer) in a different region?
86+
### Do I incur network costs if my Application Insights resource is monitoring an Azure resource (that is, telemetry producer) in a different region?
11587

116-
Yes, you may incur additional network costs which will vary depending on the region the telemetry is coming from and where it is going. Refer to [Azure bandwidth pricing](https://azure.microsoft.com/pricing/details/bandwidth/) for details.
88+
Yes, you may incur more network costs, which vary depending on the region the telemetry is coming from and where it's going. Refer to [Azure bandwidth pricing](https://azure.microsoft.com/pricing/details/bandwidth/) for details.
11789

11890
## Next step
11991

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+
> - Preaggregate metrics from any calls to TrackMetric.
17+
> - Limit the use of custom metrics where possible.
18+
> - Ensure use of updated software development kits (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). Workspace-based Application Insights resources 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+
| Preaggregate 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 [preaggregating 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 preaggregation metrics. |
31+
| Ensure use of updated software development kits (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). Similarly, 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)