Metrics - Resource not found on Static web apps Metrics page

Nirjhar Vermani 1 Reputation point
2021-01-18T13:45:53.707+00:00

I have hosted a website on static web apps with a single azure function. Whenever I go to metrics. I get resource not found for site hits or for function hits.

Website is working fine and azure function is working as well. Can somebody help and let me know what is going on with the metrics?

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,210 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
904 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 21,346 Reputation points
    2021-01-19T09:46:07.69+00:00

    Thanks for asking question! Could you please confirm if you have added Application Insights to your function app? As, Azure Static Web Apps provides an API through Azure Functions. The capabilities of Azure Functions are focused to a specific set of features that enable you to create an API for a web app and allow the web app to connect to API securely. As these features come with some constraints, which includes:

    Logs are only available if you add Application Insights to your Functions app.

    You may also refer to this blog might be helpful: GETTING LOGS FROM STATIC WEB APPS APIS

    Reference: https://video2.skills-academy.com/en-us/azure/static-web-apps/apis#constraints

    Please let us know if you have query on this.

    Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you.

    0 comments No comments

  2. Nirjhar Vermani 1 Reputation point
    2021-01-19T13:50:59.447+00:00

    Thank you but I have not added Application Insights to the project.


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.