Skip to content
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

OWIN Instrumentation #56

Closed
fjegear opened this issue Jan 26, 2021 · 5 comments · Fixed by #156
Closed

OWIN Instrumentation #56

fjegear opened this issue Jan 26, 2021 · 5 comments · Fixed by #156
Assignees

Comments

@fjegear
Copy link

fjegear commented Jan 26, 2021

Is there any plan to support OWIN? Looks like it is supported Asp.Net and Asp.Net Core but I have a WebAPI with Asp.Net self hosted using OWIN and I'd like to start using OpenTelemetry.

@cijothomas
Copy link
Member

open-telemetry/opentelemetry-dotnet#1472 There was an attempt, but its not finished.

@hotpothot
Copy link

@cijothomas, is there any rough ETA when OWIN will be supported?

@cijothomas
Copy link
Member

No ETA. I am not aware of anyone who has committed to work on it.

@hotpothot
Copy link

hotpothot commented May 13, 2021

Thanks @cijothomas. Does HttpClientInstrumentation depends on HttpModule? Can we add our owin server activity (use ActivitySource and by starting/stopping an Activity from our middleware using an ActivitySource allows the OpenTelemetry SDK to directly listen to the ActivitySource as Alex suggested) and use HttpClientInstrumentation together?

I guess my question is the only missing part in owin is auto instrument with incoming request?

eg.
builder
.SetResourceBuilder(ResourceBuilder
.CreateDefault()
.AddService("service name")
.AddHttpClientInstrumentation().AddSource("Microsoft.Payment.Web.Server")

@CodeBlanch
Copy link
Member

@hotpothot

Does HttpClientInstrumentation depends on HttpModule?

It does not. On .NET Framework we hook into HttpWebRequest/HttpClient using reflection. On .NET Core we listen to the diagnostic events emitted by the runtime.

Can we add our owin server activity (use ActivitySource and by starting/stopping an Activity from our middleware using an ActivitySource allows the OpenTelemetry SDK to directly listen to the ActivitySource as Alex suggested) and use HttpClientInstrumentation together?

Totally! If we built an official OWIN middleware that is exactly what we would do. Create an ActivitySource, start activity at the begging of the middleware, call the inner pipeline, stop activity at the end. Register your source using AddSource on the TraverProvider.

@CodeBlanch CodeBlanch self-assigned this Sep 20, 2021
@CodeBlanch CodeBlanch changed the title OWIN Collector OWIN Instrumentation Sep 20, 2021
@CodeBlanch CodeBlanch mentioned this issue Sep 20, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants