Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Initializing Application Insights telemetry on an ASP.NET Core web application
// **********************************************
// 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