Configuring Azure Diagnostics for Azure Application Service (PaaS) - azure

My setup: Existing WCF service project modified to run as Azure Application Service (PaaS).
Originally I used log4net for my info/error logging, but it is rather cumbersome to look at those logs via FTP or SCM console. After some research I came to a conclusion that Microsoft.WindowsAzure.Diagnostics is the recommended way to handle logging in Azure apps.
Question/problem: I can't find a guide, for my scenario, on how to enable WindowsAzure Diagnostics for Application Service that is NOT created as Web/Worker Role.
The closest I got is Set-AzureServiceDiagnosticsExtension cmdlet, but it requires Role as parameter...

Question/problem: I can't find a guide, for my scenario, on how to
enable WindowsAzure Diagnostics for Application Service that is NOT
created as Web/Worker Role.
You can't use Azure Diagnostics for your Azure Application Service. It is meant for Azure Cloud Service (Web/Worker Role) and Azure Virtual Machines.
For App Services diagnostics, please see this link: https://azure.microsoft.com/en-in/documentation/articles/web-sites-enable-diagnostic-log/.

Related

how to configure Windows Service Program in azure portal (PaaS)

We have installed the windows service program in azure virtual machine. After installing the windows service that has been displayed in Services.msc - this is working fine without any issues.
But while we migrating the web application to Azure PaaS , how to configure the windows service in azure portal. Kindly provide the step by step process to achieve this.
Otherwise please provide if we have any alternate method to achieve this in azure PaaS.
Thank you in advance.
There is no "Windows Service" Paas on Azure, you need to migrate your Code to Azure Functions or Azure Appservice Webjobs.
Read more here https://mariankostal.com/2021/01/24/convert-windows-service-to-azure-function/

Azure Log Integration with Application Gateway diagnostic logs

Is there a way to integrate Azure Application Gateway logs to the Azure Log integration service. I can only see that Log integration seems to work for the VM logs, Security Center, Keyvault and Azure AD audit logs but nothing else.
How can we integrate other Azure cloud services(App gateway diagnostics etc.) with Azure Log Integration?
First, to answer the question about why you are don't see log integration for Application Gateway. Log Integration is only for resources like the VM, Security centre and other things you have mentioned. The Application Gateway is more like an appliance (like a tool that you use) rather than a service (that you consume). I think that is why they are separate and you are unable to mix them up.
I guess you have already seen this link about gateway diagnostics but I am putting it here anyway - https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-diagnostics
Perhaps, it is possible for you to take the logs from the Log Integration and then the logs from the gateway and combine them in a web app of your own design.

Setting up run-time Application Insights on a Cloud Service

According to Microsoft's documentation, Application Insights is best deployed both at build time and run-time, and can be installed at run-time by "select[ing] Application Insights on the app's control panel in Azure". But I don't see it on the configuration for Cloud services, at least not in the new portal:
Is the documentation incorrect (necessitating the long process laid out elsewhere on SO still required)? If not, where should I be looking?
EDIT 3 You can supposedly set it while publishing from Visual Studio (if you upgrade the Azure SDK to 2.9 and "Add Diagnostic Configuration" in Visual Studio for the project):
but it still insists I download the Status Monitor:
In the Azure Portal, currently there is no Application InSights on the Cloud Service control panel. We could find the Application InSights on the Azure App Service. Azure App Service and Cloud Service are different services in Azure. The difference between Azure AppService and CloudService please refer to Azure App Service, Virtual Machines, Service Fabric, and Cloud Services comparison.
"select[ing] Application Insights on the app's control panel in Azure"
In the document that you mentioned, it is for Azure App service
Select Application Insights in the Azure control panel for your web app
For Cloud Service, please refer to document, there are more detail steps about how to setup Application Insights for each role .

Azure Cloud Services and Web Jobs

I have an Azure cloud service in which there are multiple background processing tasks which I would like to turn into WebJobs. I've read all I could find on the subject but it seems that WebJobs are tightly related to Web Apps and not Cloud services. I managed to create a web job in my cloud service solution and it seems it deployed correctly but I can't find a way to see it or its output on the new Azure portal (I couldn't see it in the classic management portal either)
Can one have a set of WebJobs running with a cloud service?
Web Jobs is a feature specific to Azure Web Apps. You'd need to create a Web App (in an App Service Plan) to create your Web Jobs. These are unrelated to Cloud Services (web/worker roles).

How do I configure Diagnostics when many websites are on the same Azure WebRole?

I'm working an Azure Web role with many websites as described here. How should I configure the Diagnostics for this server to that I can log errors and events from not just the primary website but all websites in the deployment / role.
The diagnostics for individual web sites are logged using the role name, role instance name and (where appropriate) the IIS service ID - so the standard Azure diagnostics should work without needing to do any further work.

Resources