-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double request telemetry logging if rewrite rule is used #1744
Comments
This sounds identical to an issue I worked on 2 years ago. IIS will create "child" requests that lose the context of the original request. I wrote the ApplicationInsights-dotnet/WEB/Src/Web/Web.Shared.Net/RequestTrackingTelemetryModule.cs Lines 321 to 339 in ce1473c
|
More InformationRewriteIn case of rewrite, a new request context is created, called the child request, and it goes through the entire IIS/ASP.NET integrated pipeline. The child request can be mapped to any of the handlers configured in IIS, and it's execution is no different than it would be if it was received via the HTTP stack. The parent request jumps ahead in the pipeline to the end request notification, and waits for the child request to complete. When the child request completes, the parent request executes the end request notifications and completes itself.
What causes double telemetry issue?
Why Endrequest of TelemetryCorrelationHttpModule creates new Activity when it does not have BeginRequest?
Which Module requires a fix?
|
Moved issue to aspnet/Microsoft.AspNet.TelemetryCorrelation#73 |
Describe your environment.
Two request telemetry are getting created for the requests which are processed with IIS UrlRewrite module
Steps to reproduce.
Describe exactly how to reproduce the error. Include a code sample if applicable.
What is the expected behavior?
What did you expect to see?
Only one entry should be displayed.
What is the actual behavior?
What did you see instead?
Right now this is a double logging for the same request.
Additional context.
Collected Perfview to investigate an issue. ASP.NET pipeline is considering it has two different request.
Microsoft-Windows-ASPNET/Request/Start
andMicrosoft-Windows-ASPNET/Request/Stop
are called for actual request and rewritten request.Further investigation required to understand if this needs to be fixed in Application Insights SDK or at the ASP.NET framework.
Below snapshot are from Perfview trace collected on my machine.
The text was updated successfully, but these errors were encountered: