I have a web api project deployed on azure... I need to see all requests arrive to the APIs.
I am almost sure that before I could see the requests but now I do not see anything... The strange thing is that now applications insights look like switched off... Here what I see when I go on azure:
So, when I go in Analytics on Applications Isights on Azure and I try to do a query on the requests table no result is found.
App. Insights is enabled:
And the instrument key is the same on azure and on my vs project:
What could be happened? Thank you
Related
I am working on the ASP.Net MVC 4.8 application. It does have Logs file log4net and it was deployed in on-premises. Now it has been migrated to Azure. Now I am trying to find out some errors and other logs information however I am not able to find where to go and look for the logfile. I have two interest, 1 check the error messages and any log information.
If I need to make some changes what would be the easiest and straightforward way to capture logs and view them in Azure portal. As you can see in the picture below unter Monitoring there are many ways are given to see the logs but I am not sure where to go.
The app service will create an application insights of the same name.
This application Insights will contain all the logs regarding the web app along with performance data and other telemetry data too.
You can view logs live under live metrics tab in application insights of the same name as web app .
Here I have deployed a simple mvc app which logs using Ilogger (typical boilerplate app which visual studio provides ) . IT will log once I refresh the page.
Refer these MS DOCS on application insights
I am trying to debug a dotnet core 5 Blazor Server app which is eating up all the memory of the IIS Server when it is deployed to a local IIS Server.
However, it is not clear what is causing the memory leak.
As far as I have been able to figure out, installing Application Insights should create the logs needed to be able to determine what the issue is.
So I have added App Insights to the Project. When I run the project, I can then see App Insights Events being created in Visual Studio.
However, the issue occurs when the app is published to the Production IIS Server. I don't understand how to view the application insight data from the Prod Server. Are logs being generated?
I have tried to find data on this, but most of what I found is for Azure Application Insights. But the app is not running on Azure.
So how do I view the logs from the Prod Server? Or is there a better way to debug this issue?
So I have added App Insights to the Project. When I run the project, I can then see App Insights Events being created in Visual Studio.
However, the issue occurs when the app is published to the Production IIS Server. I don't understand how to view the application insight data from the Prod Server. Are logs being generated?
Let me get this clear: you have created an Azure Application Insights resource. When your run the project using the debugger you can see telemetry being generated.
Is this correct?
How did you verify telemetry is being generated?
If it works locally it should work when deployed on IIS. Your application will generate telemetry that will be send to the Application Insights resource in de Azure Cloud. It does not matter whether you app is actually hosted on Azure or not in this scenario.
If you are not seeing telemetry make sure the instrumention key is correctly set in the production environment.
There are several ways to explore the telemetry send to Application Insights:
https://learn.microsoft.com/en-us/azure/azure-monitor/app/diagnostic-search
https://learn.microsoft.com/en-us/azure/azure-monitor/app/overview-dashboard
https://learn.microsoft.com/en-us/azure/azure-monitor/logs/queries
After some study, I found the answer to this.
You can use Azure Application Insights to view data collected from an asp.net core app, no matter where the app is actually running. It can be running on-premise, or in the cloud.
The way this works is that in your app, you add a "Connection String" for application insights. The connection string is made available in the Application Insights resource that you create in Azure.
Then you add this connection string to your code in your app. The, when the app runs, whether in Visual Studio, or from a published location, the app send data up to the Azure Resource through an endpoint.
The connection string looks like this:
InstrumentationKey=000000-0000-0000-0000-000000000;IngestionEndpoint=https://eastus2-0.in.applicationinsights.azure.com/
Then you add code such as:
var options = new ApplicationInsightsServiceOptions { ConnectionString = #"InstrumentationKey==000000-0000-0000-0000-000000000;IngestionEndpoint=https://eastus2-0.in.applicationinsights.azure.com/" };
services.AddApplicationInsightsTelemetry(options: options);
There are a number of ways to actually add the connection string. See the docs here
You then log into Azure to view the data collected.
I set up Application Insights on my asp.net core (2.2) app. I can see data in Azure portal when I run my application locally. However, once I deploy it to App Service in Azure, Application Insights stop working - there is no data flow at all. Are there any additional steps I am missing?
Adding to Stuart's comments- > If you edited ApplicationInsights.config, kindly check the configuration of TelemetryInitializers and TelemetryProcessors. An incorrectly-named type or parameter can cause the SDK to send no data.
Also, in the Application Insights portal, open Diagnostic Search. Data usually appears here first. Refresh to see if it helps.
If feasible, you may restart the app and check to see if that helps.
I was wondering if someone can shed some lights on the application monitoring and alerting solution that's being used to specifically monitor the Azure app service. We have multiple API apps running on App service service and we would like to monitor certain metrics (ex: Availability, response time, number of request received, etc). I enabled the application insight on each of these apps and the result is quite promising, it fulfills all my requirement, but there's one small issue: I need to scroll through each app to see their performance. I can't aggregate them all in one space. I would like to create a centralized dashboard for all aforementioned metrics and have them displayed. I tried using OMS but it seems to be lacking a lot of functionality.
Any pointer would be very appreciated.
I wrote recently about it on our blog: http://predica.pl/blog/azure-monitoring-and-auditing/ - you will find link to MS documentation also there.
If you are using App Insights already you should be able to pick things from App Insights and put it on the Azure portal dashboard. Other than that probably getting data into Power Bi application insight is your best shot - https://powerbi.microsoft.com/en-us/documentation/powerbi-content-pack-application-insights/
I've recently starting experimenting with azure cloud hosting and my web app had about 10 minutes down time today.
I'm not sure why and I was wondering what tools I have available for determining the cause of the downtime.
You have application logs and site logs. Basically application logs are information produced by your web app code. You can use instrumentation to trace call and exceptions in your appliction. Site logs are information produced by the web server and you can see error messages and failed request tracing without instrumenting your code. You won't have relevant information now since by default all diagnostics are turned off but if it happens again you know where to look for.
Here's how to enable and visualize this information.
Enable diagnostics logging for web apps in Azure App Service
https://azure.microsoft.com/en-us/documentation/articles/web-sites-enable-diagnostic-log/