This file contains hidden or 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
| protected void Application_Start() | |
| { | |
| AreaRegistration.RegisterAllAreas(); | |
| FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); | |
| RouteConfig.RegisterRoutes(RouteTable.Routes); | |
| BundleConfig.RegisterBundles(BundleTable.Bundles); | |
| TelemetryConfiguration.Active.TelemetryInitializers.Add(new ClientIpHeaderTelemetryInitializer()); | |
| var builder = TelemetryConfiguration.Active.TelemetryProcessorChainBuilder; |
This file contains hidden or 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
| <TelemetryProcessors> | |
| <Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor, Microsoft.AI.PerfCounterCollector" /> | |
| <Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel"> | |
| <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond> | |
| </Add> | |
| <Add Type="ApplicationInsightDemoSite.NotFoundFilter, ApplicationInsightDemoSite" /> | |
| </TelemetryProcessors> |
This file contains hidden or 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
| public class NotFoundFilter : ITelemetryProcessor | |
| { | |
| private ITelemetryProcessor Next { get; set; } | |
| public NotFoundFilter(ITelemetryProcessor next) | |
| { | |
| this.Next = next; | |
| } | |
| public void Process(ITelemetry item) |
This file contains hidden or 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
| protected void Application_Start() | |
| { | |
| AreaRegistration.RegisterAllAreas(); | |
| FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); | |
| RouteConfig.RegisterRoutes(RouteTable.Routes); | |
| BundleConfig.RegisterBundles(BundleTable.Bundles); | |
| TelemetryConfiguration.Active.TelemetryInitializers.Add(new ClientIpHeaderTelemetryInitializer()); | |
| } |
This file contains hidden or 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
| <TelemetryInitializers> | |
| <Add Type="Microsoft.ApplicationInsights.DependencyCollector.HttpDependenciesParsingTelemetryInitializer, Microsoft.AI.DependencyCollector" /> | |
| <Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer" /> | |
| <Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureWebAppRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer" /> | |
| <Add Type="Microsoft.ApplicationInsights.WindowsServer.BuildInfoConfigComponentVersionTelemetryInitializer, Microsoft.AI.WindowsServer" /> | |
| <Add Type="Microsoft.ApplicationInsights.Web.WebTestTelemetryInitializer, Microsoft.AI.Web" /> | |
| <Add Type="Microsoft.ApplicationInsights.Web.SyntheticUserAgentTelemetryInitializer, Microsoft.AI.Web"> | |
| <Filters>search|spider|crawl|Bot|Monitor|AlwaysOn</Filters> | |
| </Add> | |
| <Add Type="Microsoft.ApplicationInsights.Web.ClientIpHeaderTelemetryInitializer, Microsoft.AI.Web" /> |
This file contains hidden or 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
| /// <summary> | |
| /// Implements initialization logic. | |
| /// </summary> | |
| /// <param name="platformContext">Http context.</param> | |
| /// <param name="requestTelemetry">Request telemetry object associated with the current request.</param> | |
| /// <param name="telemetry">Telemetry item to initialize.</param> | |
| protected override void OnInitializeTelemetry(HttpContext platformContext, RequestTelemetry requestTelemetry, ITelemetry telemetry) | |
| { | |
| if (string.IsNullOrEmpty(telemetry.Context.Location.Ip)) | |
| { |
NewerOlder