No logs for a Resource Fallen in Static Web Apps

Luis Bastidas 0 Reputation points
2024-05-15T17:45:40.52+00:00

I have a serverless resource deployed as a Static Web App in my Azure Cloud Subscription. This application has been running normally, but in the last weeks, it has been falling in a non-constant way. But now, the app got down and it is not restarted. When I try to see if there are any logs to see what the errors could be, I see there are no logs in the registers provided by Azure. I attach a screenshot of the error shown in clients browser.ERROR_MESSAGE

Can you help me know how to enable this logs so I can know what happend with the applications and why it crashed or finished working?

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
998 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sreeju Nair 12,371 Reputation points
    2024-05-16T10:22:27.5266667+00:00

    You can enable application insights to your static web app. It allows you to investigate Failures, gives access to logs and metrics.

    Refer https://learn.microsoft.com/en-us/azure/static-web-apps/monitor

    You can set log levels to see what types of logs are logged.

    Refer: https://learn.microsoft.com/en-us/azure/static-web-apps/monitor#limit-logging

    Hope this helps

    0 comments No comments

  2. brtrach-MSFT 16,676 Reputation points Microsoft Employee
    2024-05-21T02:58:18.55+00:00

    @Luis Bastidas I agree with the recommendation provided by Sreeju. To add to the response, you can also consider inserting trace calls into your JavaScript code.

    Lastly, please note that Azure Monitor is a separate product with its own pricing model.

    If you found either of our answers helpful, please consider accepting them as the answer.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.