AzureAzure Application InsightsObservability

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_application_insights is Azure's APM offering. As of 2024, all new Application Insights resources are workspace-based, meaning telemetry flows into a linked Log Analytics workspace and bills through that workspace's pricing.

Pricing model:

Workspace-based (the only current option): bills via the linked azurerm_log_analytics_workspace at standard Log Analytics rates: $2.30/GB ingested in the Pay-As-You-Go tier. First 5 GB/month free per Application Insights resource.

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_application_insights.

DimensionUnitWhat's being charged
Telemetry ingestionper GBTelemetry data flows to Log Analytics and bills at the workspace's rate.
$2.30/GB (Pay-As-You-Go)
Free tier5 GB/monthEach Application Insights resource gets 5 GB/month free. Multiple App Insights resources each get their own 5 GB free.
Multi-step web testsper test per locationSynthetic availability monitoring. $1.00 per multi-step test per location per month.
Standard web testsfreeBasic ping tests. No charge for the tests themselves, just the data they generate.

Optimization tips

Common ways to reduce azurerm_application_insights cost without changing the workload.

Set sampling to 5-10% for high-traffic apps

Up to 90% on ingest

100% capture is usually overkill. Sampling to 10% (sampling_percentage = 10 on the resource) cuts ingest by 90% while preserving statistical accuracy. Adaptive sampling is even better.

Filter dependency telemetry by URL pattern

Workload-dependent

Dependency 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 bills

Set daily_data_cap_in_gb to cap accidental cost from a misconfigured app or attack. Once cap is hit, ingestion pauses for the day.

Move to OpenTelemetry-based telemetry

Workload-dependent

OpenTelemetry 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

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_application_insights.