Last active
February 18, 2020 22:02
-
-
Save hd9/071f40bcd307ea327ea9c4b7533e879b to your computer and use it in GitHub Desktop.
Initializing Application Insights telemetry on an ASP.NET Core web application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ********************************************** | |
// Fore more information, visit: | |
// https://blog.hildenco.com/2020/03/adding-application-insights-telemetry.html | |
// ********************************************** | |
public class HomeController : Controller | |
{ | |
private readonly ILogger<HomeController> _logger; | |
private readonly TelemetryClient _telemetry; | |
public HomeController(ILogger<HomeController> logger, TelemetryClient telemetry) | |
{ | |
_telemetry = telemetry; | |
_logger = logger; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment