Azure Function apps are configured to send telemetry to Application Insights when application settings include APPLICATIONINSIGHTS_CONNECTION_STRING or APPINSIGHTS_INSTRUMENTATIONKEY.
Risk
Without this telemetry, visibility into exceptions, dependencies, and performance is lost, reducing availability and delaying response. Gaps in traces mask anomalous traffic and failures, enabling prolonged outages and undermining integrity of processing (e.g., undetected retries or timeouts).
prowler azure --checks app_function_application_insights_enabled
Recommendation
Enable Application Insights for each Function App using a APPLICATIONINSIGHTS_CONNECTION_STRING and standardize telemetry. Apply defense in depth: use distributed tracing, alert on errors/latency, and enforce least-privilege access and retention on logs to prevent blind spots and speed recovery.
Remediation
az functionapp config appsettings set --resource-group <RESOURCE_GROUP> --name <FUNCTION_APP_NAME> --settings APPLICATIONINSIGHTS_CONNECTION_STRING=<CONNECTION_STRING>
- In Azure Portal, go to Function App > Configuration > Application settings
- Click + New application setting
- Name: APPLICATIONINSIGHTS_CONNECTION_STRING
- Value: paste the connection string from your Application Insights resource (Overview > Connection string)
- Click OK, then Save
- If prompted, click Continue to apply the changes
Source Code
Resource Type
microsoft.web/sites