host.json configures the Azure Functions runtime host — not one function, but every function in the app. A handful of settings decide your telemetry bill and your reliability under load.
Control telemetry cost with sampling
Application Insights bills per ingested item. Sampling caps the rate so a traffic spike does not blow up your bill:
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"maxTelemetryItemsPerSecond": 20,
"excludedTypes": "Request"
}
}
excludedTypes keeps every request but samples the noisier traces.
Cap execution time
"functionTimeout": "00:05:00" stops runaway executions. On the Consumption plan the hard ceiling is 10 minutes — set it explicitly rather than relying on the default.
Retry transient failures
An app-wide retry policy beats hand-rolled loops in every function:
"retry": {
"strategy": "fixedDelay",
"maxRetryCount": 3,
"delayInterval": "00:00:05"
}
Shape HTTP behavior
extensions.http sets the routePrefix (default api) and concurrency limits — maxConcurrentRequests and maxOutstandingRequests protect a downstream database from being overwhelmed during a burst.
Security notes
- host.json is not for secrets. Connection strings and keys belong in application settings or Key Vault references.
- Lower
logLevelin production so payloads do not leak into logs.
Open the host.json template and ask the workspace to "set the function timeout to 10 minutes" or "add a retry policy with fixed delay", then diff the result.