title: ASP.NET Core + ApplicationInsights Logging Errors as Trace
body: <p>I am using Microsoft.ApplicationInsights.AspNetCore (<a href="https://www.nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore" rel="noreferrer">https://www.nuget.org/packages/Microsoft.ApplicationInsights.AspNetCore</a>).</p>
  
  <p>I've enabled application insights by adding .UseApplicationInsights() in Programs.cs and in my startup class:</p>
  
  <pre><code>    loggerFactory.AddApplicationInsights(app.ApplicationServices);
  </code></pre>
  
  <p>This all works fine, I am able to see requests in app insights but when I try to log an error (for example in my controller):</p>
  
  <pre><code>        _logger.LogError("My Error Log");
          _logger.LogError("Test", new Exception("Test"));
  </code></pre>
  
  <p>Both are logged as trace events and not exceptions in app insights.</p>
  
  <p>How do I make it so it logs as an exception?</p>