diff --git a/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightMiddlewareExtensions.cs b/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightMiddlewareExtensions.cs index 7ea370d..09d7142 100644 --- a/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightMiddlewareExtensions.cs +++ b/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightMiddlewareExtensions.cs @@ -11,7 +11,7 @@ return app; } - public static IApplicationBuilder UseApplicationInsightsTelemetry(this IApplicationBuilder app) + public static IApplicationBuilder UseApplicationInsightsExceptionTelemetry(this IApplicationBuilder app) { app.UseMiddleware(); return app; diff --git a/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightsExtensions.cs b/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightsExtensions.cs index 1d58d42..4848e1c 100644 --- a/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightsExtensions.cs +++ b/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightsExtensions.cs @@ -8,7 +8,7 @@ public static class ApplicationInsightsExtensions { - public static void AddTelemetry(this IServiceCollection services, IConfiguration config) + public static void AddApplicationInsightsTelemetry(this IServiceCollection services, IConfiguration config) { TelemetryConfiguration.Active.InstrumentationKey = config.Get("ApplicationInsights:InstrumentationKey"); diff --git a/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightsJavaScriptSnippetExtensions.cs b/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightsJavaScriptSnippetExtensions.cs index 1ad548e..70e05d3 100644 --- a/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightsJavaScriptSnippetExtensions.cs +++ b/TemplateIntegrationExample/src/Microsoft.ApplicationInsights.AspNet/ApplicationInsightsJavaScriptSnippetExtensions.cs @@ -1,15 +1,18 @@ -namespace Microsoft.AspNet.Mvc.Rendering +//namespace Microsoft.AspNet.Mvc.Rendering +namespace Microsoft.ApplicationInsights.AspNet { using Microsoft.ApplicationInsights; using Microsoft.AspNet.Mvc; + using Microsoft.AspNet.Mvc.Rendering; + using System.Collections.Generic; public static class ApplicationInsightsJavaScriptSnippetExtensions { - public static HtmlString ApplicationInsightsJavaScriptSnippet(this IHtmlHelper helper) + public static HtmlString ApplicationInsightsJavaScriptSnippet(this IHtmlHelper helper, string instrumentationKey, Dictionary parameters = null) { //see: https://github.com/aspnet/Mvc/issues/2056 - var client = (TelemetryClient)helper.ViewContext.HttpContext.ApplicationServices.GetService(typeof(TelemetryClient)); - return new HtmlString(""); + //var client = (TelemetryClient)helper.ViewContext.HttpContext.ApplicationServices.GetService(typeof(TelemetryClient)); + return new HtmlString(""); } } } \ No newline at end of file