question

CasperRubaek avatar image
0 Votes"
CasperRubaek asked CasperRubaek answered

Snapshot debugging does not work with Azure function in Consumption tier

I have enabled snapshot debugging by adding this in the host.json file in the azure function and redeploying the function app:

{
"version": "2.0",
"logging": {
"applicationInsights": {
"snapshotConfiguration": {
"isEnabled": true
}
}
}
}

according the docs: https://docs.microsoft.com/da-dk/azure/azure-monitor/app/snapshot-debugger-function-app

However even though I can see the exception I generated and the end to end transaction, the button to see snapshot debug is not visible, even though I have waited 10 minutes for the debug snapshot to be created:

111513-image.png




I have also tried adding the nuget package: Microsoft.ApplicationInsights.SnapshotCollector.

However it still does not work.

Can you advise how to fix this?


azure-functionsazure-monitor
image.png (20.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT commented

Hi @CasperRubaek

Sharing previous discussion on the same.
As mentioned in the document Snapshot Debugger currently works for ASP.NET and ASP.NET Core apps that are running on Azure Functions on Windows Service. We recommend you run your application on the Basic service tier or higher when using Snapshot Debugger.

Let me know if you have any queries or concerns.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Does this mean it is not possible to use the feature with Functions on Consumption tier, just only App Service plan?
It is a feature I would like to use very much for Functions in serverless modes like Consumption.

I will try to reach out in the shared discussion for a solution.

0 Votes 0 ·

@CasperRubaek Yes it’s not supported for Functions in Consumption. It works fine for Functions in App Service plan.
Please feel free to raise a feature request on UserVoice to support this, if this is something that you would want to see in Azure function consumption plan.

0 Votes 0 ·
CasperRubaek avatar image
0 Votes"
CasperRubaek answered

For anyone with this problem, please add your vote on this feature request I have created for both Consumption and Premium hosting plans to use snapshot debugging:

https://feedback.azure.com/forums/355860-azure-functions/suggestions/43771764-snapshot-de

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.