azurerm_ application_ insights cost estimation
Application performance monitoring. Bills through a linked Log Analytics workspace by GB ingested. Free tier covers 5 GB/month.
An azurerm_
Pricing model:
Workspace-based (the only current option): bills via the linked azurerm_
Legacy classic mode (deprecated): had its own pricing ($2.30/GB beyond 5 GB free). Existing classic resources still work but new resources must be workspace-based.
What gets ingested:
Requests: every HTTP request handled by your instrumented application. Volume scales with traffic.
Dependencies: every outgoing call (HTTP, SQL, etc.). High for chatty services that talk to many backends.
Traces and logs: application logs forwarded to App Insights. Volume depends on log levels.
Exceptions: stack traces for unhandled exceptions. Usually low volume.
Custom events: explicit telemetry sent via TrackEvent. Volume depends on application instrumentation.
Live Metrics Stream: real-time metrics. Free, doesn't count toward ingestion.
Sampling can dramatically reduce ingestion. Default 100% capture is usually unnecessary; sampling to 5-10% preserves statistical accuracy while cutting cost 10-20x.
c3x estimates Application Insights as $0 in the resource itself; the cost is in the linked Log Analytics workspace. Specify expected ingest there.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "azurerm_log_analytics_workspace" "main" {
name = "production-logs"
location = "eastus"
resource_group_name = azurerm_resource_group.main.name
sku = "PerGB2018"
retention_in_days = 30
}
resource "azurerm_application_insights" "api" {
name = "production-api-ai"
location = "eastus"
resource_group_name = azurerm_resource_group.main.name
workspace_id = azurerm_log_analytics_workspace.main.id
application_type = "web"
sampling_percentage = 10
tags = {
Environment = "production"
}
}Pricing dimensions
What you actually pay for when you provision azurerm_.
| Dimension | Unit | What's being charged |
|---|---|---|
| Telemetry ingestion | per GB | Telemetry data flows to Log Analytics and bills at the workspace's rate. $2.30/GB (Pay-As-You-Go) |
| Free tier | 5 GB/month | Each Application Insights resource gets 5 GB/month free. Multiple App Insights resources each get their own 5 GB free. |
| Multi-step web tests | per test per location | Synthetic availability monitoring. $1.00 per multi-step test per location per month. |
| Standard web tests | free | Basic ping tests. No charge for the tests themselves, just the data they generate. |
Optimization tips
Common ways to reduce azurerm_ cost without changing the workload.
Set sampling to 5-10% for high-traffic apps
Up to 90% on ingest100% capture is usually overkill. Sampling to 10% (sampling_
Filter dependency telemetry by URL pattern
Workload-dependentDependency calls to noisy endpoints (health checks, metric scrapers) can dominate telemetry. Filter at the SDK level to drop them before they're sent.
Use Application Insights workspaces with daily cap
Avoid surprise billsSet daily_
Move to OpenTelemetry-based telemetry
Workload-dependentOpenTelemetry exports support more control over what's captured and where it goes. For multi-cloud or split-destination scenarios, OTel is more flexible than the Application Insights SDK.
FAQ
Why is Application Insights billing through Log Analytics?
Microsoft converged Application Insights and Log Analytics in 2022. New Application Insights resources must point at a Log Analytics workspace. Telemetry data flows there and bills at workspace rates. The old classic mode with separate billing is deprecated.
Does the 5 GB free tier still apply?
Yes. Each Application Insights resource gets its own 5 GB/month free, separate from the workspace's own free tier (also 5 GB). For accounts with many App Insights resources, the free tiers add up.
How do I find what's driving my Application Insights cost?
Query the workspace with SELECT * FROM Usage to see ingestion by data type. Usually requests, dependencies, and traces dominate. Then sample or filter the high-volume categories.
Should I use Application Insights or just metrics?
Application Insights for distributed traces, exceptions, and detailed performance. Plain Azure Monitor metrics for simple system metrics (CPU, memory). The cost difference is huge: metrics are mostly free, App Insights traces are per-GB.
Related resources
More Azure resources
Further reading
- Azure Application Insights cost: you pay per GB of telemetry
Application Insights bills by data ingested (around $2.30 per GB after a free allowance) plus retention beyond 90 days. Sampling and trimming noisy telemetry are the main levers. Here is how the ingestion-based model works.
- Monitoring cost compared: CloudWatch vs Azure Monitor vs Cloud Monitoring
CloudWatch, Azure Monitor, and Google Cloud Monitoring all bill on metrics, logs ingested, and API calls, with generous free tiers for platform metrics. Logs and custom metrics drive the bill. This compares them and the shared levers.
- How to estimate Azure costs from Terraform
Estimate Azure costs from Terraform configurations including Reserved Instances, Azure Hybrid Benefit, Spot VMs, and Premium SSD tier mapping. Completes the cloud trilogy alongside AWS and GCP.
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including azurerm_.