2
votes

So I am in a project where we have a dotnet MVC app inside a React application. We are hosting everything in Azure. The MVC and the React applications are linked to Azure Application Insights resources for monitoring.

I was wondering how I could unify both application insights for my queries in Log Analytics. I went through this documentation. The problem being that I always get an error saying: "unknown function app" when I try to do the following: enter image description here Both resources exist and are in the same resources group. I feel like I am not executing the query from the right scope. I tried executing this same query from the scope of the entire subscription, the complete resource group and from the application's scope.

I was wondering if someone would know how to execute such a query and use the app function.

The linked documentation refers to a "workspace". I think this is the source of my scope problem, since I only tried to run the query from the Azure Monitor page and from the scopes I mentionned previously.

UPDATE IntelliSense is now aware of the app function, but I get the following error: error

Thank you very much for reading my question! I am new to Azure Monitoring!

1
Can you just try run this query and see if it can work? The query: app('your_application_insights').requestsIvan Yang
I tried the command in a few places. It did not work in a Log Analytics Workspace. However, the app function does work in the application insights of an App Services resourcevitonimal
What about running it in azure monitor -> logs? I did try it in Azure Monitor or Log Analytics workspace, it can work.Ivan Yang
I just tried again in a workspace and it did work. Thanks!vitonimal
Oh, it maybe a sudden server error. I just posted an answer if any other people met the same error, this can help them.Ivan Yang

1 Answers

1
votes

I tried this query in Log Analytics workspace, and it can work well.

You can try just run the query app('your_application_insights').requests to see if it can work in Azure Log Analytics / Azure Monitor / Application Insights.

Or this may due to a sudden server error, you can try it later.