question

GunnarBraaten-8535 avatar image
0 Votes"
GunnarBraaten-8535 asked ajkuma-MSFT commented

Why I am seeing "Resource not found" for all the statistics in the overview of my Static Web App?

I hope the title says it all. I have created an app and deployed it successfully, but I am not seeing any statistics. I can't figure out why. Please advice.

79926-stats.png



azure-static-web-apps
stats.png (21.4 KiB)
· 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.

Probably its new created app so there is nothing to show in stats yet. After web app usage, check the stats once again

0 Votes 0 ·

That was what I though initially too, but I don't think that is it. I have now called the app several times, and it has been up since yesterday.

Maybe the problem is even more basic? I see now that "Logs are only available if you add Application Insights to your Functions app." under https://docs.microsoft.com/en-us/azure/static-web-apps/apis, so I guess I have to do that first? And I guess I have to do the same for my node application (https://docs.microsoft.com/en-us/azure/azure-monitor/app/nodejs)?

0 Votes 0 ·

1 Answer

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

@GunnarBraaten-8535,

Exploring metrics requires Microsoft.Insights resource provider registered in your subscription. In many cases, it is registered automatically (that is, after you configure an alert rule, customize diagnostic settings for any resource, or configure an autoscale rule). If the Microsoft.Insights resource provider is not registered, you must manually register it by following steps described in Azure resource providers and types.

Try these steps:
In Azure Portal> Open Subscriptions, Resource providers tab, and verify that Microsoft.Insights is registered for your subscription.

If the issue still persist; from the issue description I believe it's a new subscription and you just started provisioning the resources. Are you an admin or co-admin/or have any specific RBAC role assigned on the subscription?
The doc, you referenced is however related to API support in Azure Static Web Apps with Azure Functions; but linked to Application Insights itself.

· 4
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.

It looks like microsoft.insights is registered to my subscription:

81672-stats.png

It is a new subscription, created by me, so I have full access.

I was linking to the documentation because I am indeed looking for statistics from my Azure Static Web App and the related Azure Function. I am not sure what you mean by this comment.

0 Votes 0 ·
stats.png (3.8 KiB)

Thanks for the follow-up and sharing additional details for clarity. I would need details of your website (URL)/subscription info, I'm following-up on this and will post back shortly.

In the interim, could you please confirm the resource/app still exist? If feasible, create a test static webapp and review ('Requests' and 'Data out') metrics.

Kindly review the solutions for Resolve resource not found errors

Also, Troubleshooting metrics charts

My test app with no calls, but stil doesn't display 'resource not found' message.
81992-image.png


Note: Kindly do not share any PII information on the public forums.


0 Votes 0 ·
image.png (21.6 KiB)

In regards to the docs that are linked/they are for different services:

API support in Azure Static Web Apps Preview with Azure Functions - main app in focus/Azure Static Web App.
Monitor your Node.js services and apps with Application Insights - generic Node app/monitoring techniques applicable across different Azure services- the example outlined is for 'Azure App Service' in specific.

0 Votes 0 ·

I have confirmed with our product engineering team, this issue must be fixed. Kindly let us know (w/ region) if you're still seeing this. Apologies for any inconvenience! Thanks for your patience!

0 Votes 0 ·