Open rahjesh-vunet opened 3 weeks ago
@rahjesh-vunet - looks like you are using https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation?
@rahjesh-vunet - looks like you are using https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation? @vishweshbankwar Yes. I was using https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation. This is using the AspNet instrumentation from contrib. Isn't it?
@vishweshbankwar
I had a comment from Mateusz Łach in the slack channel.
@lachmatt - Should this be moved to https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation?
@vishweshbankwar yes
@rahjesh-vunet, could you please provide Minimal, Reproducible Example? It will significantly reduce time to reproduce the issue. Then we can try to help/mitigate the problem.
@rahjesh-vunet, could you please provide Minimal, Reproducible Example? It will significantly reduce time to reproduce the issue. Then we can try to help/mitigate the problem.
@Kielek I have provided the following in the issue.
If you follow this, you can reproduce the issue.
Is that make sense or am I missing something?
Component
OpenTelemetry.Instrumentation.AspNet
Package Version
Runtime Version
net47
Description
In my .NET Framework (4.7) application, I have a OWIN based middleware which set a custom header to the HTTP Request. `public class AuthMiddleware : OwinMiddleware { public AuthMiddleware(OwinMiddleware next) : base(next) { }
}`
When I instrument this application using opentelemetry .net instrumentation power shell script, the application got exception. ( Please see the attached screenshot). If I just disable the Asp Net instrumentation (OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_ENABLED = false), the application works fine and there was no exception. I tried with Opentelemetry .NET instrumentation versions 1.2.0, 1.4.0 and 1.7.0. All behave same way. Is the Opentelemetry Asp Net Instrumentation locks the request headers of some think like this which affects the other middlewares. My middleware was not able to set a custom header to the http request headers.
But the instrumentation works and I could see the traces in the OTel Collector.
Steps to Reproduce
Expected Result
The API works even after Opentelemetry .NET instrumentation
Actual Result
Additional Context
No response