Blog Post

Apps on Azure Blog
2 MIN READ

GA: App Insights integration for .NET apps on App Service Linux and On by Default for .NET and Java

YutangLin's avatar
YutangLin
Icon for Microsoft rankMicrosoft
Dec 20, 2022

The Azure Monitor and App Service teams are happy to share that Application Insights integration with App Services for .NET apps running on Linux is now generally available. You can now easily monitor your .NET applications on App Service Linux without changing your code by leveraging auto-instrumentation that is integrated into the App Services platform. With this feature enabled, the App Service platform will configure and attach a .NET application insights agent to your application runtime. This will allow application-level logs, metrics, and traces to flow into your Application Insights resource allowing you to understand how your .NET Linux application is performing and more easily determine the cause of any incidents. 

 

In addition to being generally available, this feature and the App Service/App Insights integration for Java applications, which was announced as generally available in July 2021, will be configured to be “On By Default”. Moving forward, when you create a new web application, the “Monitoring” tab for enabling Application Insights will have a default selection of “yes” for any new .NET or Java web applications. This will ensure that your applications are monitored automatically from day zero. These new applications may incur Application Insights related charges. Click here learn more about Application Insights pricing. 

 

Enabling App Insights integration for .NET apps 

Portal and go to the Application Insights menu item. 

  1. Select Turn on Application Insights 
  2. Select a Location for your Application Insights resource to be created (It’s suggested to create the resource in the same region as the Web App.) 
  3. (Optional) use the .NET Core language tab to configure the Application Insights agent. 

Enabling App Insights for .NET apps

 

Application Insights “On By Default” for .NET and Java 

When you create a new .NET or Java web application, the “Enable Application Insights” monitoring option will have a default selection of “yes”. This means that any new non-containerized .NET or Java applications will, by default, pipe data to an Application Insights resource allowing you automatically monitor your workloads.  

"On by default" for .NET and Java apps

 

 

Published Dec 20, 2022
Version 1.0
  • Jayendran, Application Insights integration for App Service uses connection string. To my knowledge, if you instrument your application with this method, then you cannot use AD based authentication. Our non-integrated instrumentation method for Java is codeless and enabling AD for that method is documented in the link I provided in my last comment. Providing this functionality for integrated integrations is on our radar and some stacks may provide support sooner than others, but I don't have any definite timelines. I do believe, though, that you will see something in 2023. I will keep you posted.

  • Jayendran's avatar
    Jayendran
    Iron Contributor

    Thanks, abinetabate for your response. I know we can use AD-based authentication for app insights. But my question here is Does enabling app insights via the portal (Codeless approach) is using what kind of authentication behind the scene?  I thought it is using Instrumental Key- So is there any way we can change (enabling app insights via the portal) to enforce to use AD based authentication?

  • Jayendran's avatar
    Jayendran
    Iron Contributor

     Thanks YutangLin  for the nice article. I beleive behind the scene it uses the Instrumentation Key for the Autentication . Is there a way that we can change that to AD (RBAC) ? For a better security and to avoid key based autentication some of the App Insights can be configured to disable Key based Autentication. Is there a way this can be achieved without the key based autentication ?