Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon Is it possible to test host.json changes without redeploying the app


Is it possible to test host.json changes without redeploying the app


Yes, it is possible to test changes to the `host.json` file without redeploying the entire app, especially in Azure Functions. You can override specific `host.json` settings using application settings. This allows you to modify or configure settings for a specific environment without changing the `host.json` file itself.

For example, if you want to disable Application Insights sampling locally, you can add an application setting like `"AzureFunctionsJobHost__logging__applicationInsights__samplingSettings__isEnabled":"false"` in your `local.settings.json` file. This way, you can test the changes locally without affecting the production environment or redeploying the app[1][2][5].

However, if you need to test changes directly in the `host.json` file, you would typically need to redeploy the app to see those changes take effect in a production environment. But using application settings provides a flexible way to test different configurations without redeployment.

Citations:
[1] https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json
[2] https://docs.azure.cn/en-us/azure-functions/functions-app-settings
[3] https://stackoverflow.com/questions/66936480/what-should-i-use-to-host-a-public-json-file-that-rarely-changes-without-redeplo
[4] https://answers.netlify.com/t/any-way-to-update-a-json-file-on-your-site-without-having-to-redeploy-the-entire-site/44950
[5] https://dev.to/massimobonanni/azure-functions-tips-override-the-hostjson-settings-21mi
[6] https://learn.microsoft.com/en-us/azure/logic-apps/edit-app-settings-host-settings
[7] https://github.com/Azure/azure-functions-host/issues/3718
[8] https://learn.microsoft.com/en-us/azure/azure-functions/configure-monitoring
[9] https://firebase.google.com/docs/hosting/test-preview-deploy
[10] https://github.com/Azure/Azure-Functions/issues/383