-
Notifications
You must be signed in to change notification settings - Fork 302
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
Not all ASP.NET requests are exported #1783
Comments
Do note that we noticed this behaviour on a ServiceStack application, running the last BSD-licensed version of ServiceStack. Here's an attempt to reproduce the problem: EDIT: I updated the example with example of what happens if a servicestack handler contains code that starts an activity (e.g. a http client call) |
If the activity.current is null during OnEnd callback, then it could be a bug outside of this repo. (Like AspNetTelemetryCorrelation module.) Is this only occurring with ServiceStack? |
As far as we know, yes. The HttpReqIn activity is finished in another plain asp.net mvc site that we host. |
We are having the same problem when forwarding a http request from one .net wepabi (Server A) to another .net webapi (Server B). When inspecting the Activity.Current in an Owin middleware on Server B we also see "Microsoft.AspNet.HttpReqIn". Opentelemtry is configured for Server B but the trace for this request is not exported. If we call Server B directly, tracing works as expected. What is the status of this ticket? |
We are using OTEL to enable monitoring for our .NET Application and are experiencing the same issue where the traces are generated with limited information and not all activities are recorded. I suspect, the issue is similar to what has been described here, is there any update on this issue ? |
Bug Report
List of NuGet packages and
version:
OpenTelemetry.Instrumentation.AspNet
1.0.0-rc1.1OpenTelemetry.Instrumentation.Http
1.0.0-rc1.1OpenTelemetry.Contrib.Exporter.Stackdriver
local buildRuntime version:
net472
Symptom
We are running an ASP.NET (classic) application with the telemetry module provided by Microsoft in
Microsoft.AspNet.TelemetryCorrelation
1.0.8. HTTP requests and ASP.NET instrumentation are enabled and exported to Stackdriver through a local build of the contrib project with updated dependecy to underlying open-telemetry package to 1.0.0-rc1.1. For many requests, this works as expected and trace data is ingested by Cloud Trace. However, some requests are never properly instrumented. One may suspect the local build of Stackdriver as the culprit, but I believe that the issue lays somewhere in the ASP.NET instrumentation library. After debugging the code I have made the following observations:When everything works:
Microsoft.AspNet.HttpReqIn
is correctly created by theTelemetryCorrelationHttpModule
.OnStartActivity
onOpenTelemetry.Instrumentation.AspNet.Implementation.HttpInListener
is calledOnStopActivity
onOpenTelemetry.Instrumentation.AspNet.Implementation.HttpInListener
is calledExport
is triggered on registered exportersWhen traces are not exported:
Microsoft.AspNet.HttpReqIn
is correctly created by theTelemetryCorrelationHttpModule
.OnStartActivity
onOpenTelemetry.Instrumentation.AspNet.Implementation.HttpInListener
is calledOnStopActivity
onOpenTelemetry.Instrumentation.AspNet.Implementation.HttpInListener
is not calledExport
is not triggered on registered exportersWhen backtracking why
OnStopActivity
is not called, I noticed thatOpenTelemetry.Instrumentation.DiagnosticSourceListener
'sOnNext
method bails out here when called withMicrosoft.AspNet.HttpReqIn.Stop
kvp becauseActivity.Current
isnull
.What is the expected behavior?
All HTTP requests to the ASP.NET should be instrumented and exported
What is the actual behavior?
Some http requests are not instrumented and exported
Reproduce
Unfortunately, I have not been able to create a small repro app. I will continue to investigate this issue and see if I can get back with easier repro-steps.
The text was updated successfully, but these errors were encountered: