csharp-netcore icon indicating copy to clipboard operation
csharp-netcore copied to clipboard

How to extend based on OpenTracing.Contrib.NetCore?

Open yang-xiaodong opened this issue 6 years ago • 6 comments

Hello , Thanks for the great work.

I want to add some extensions to OpenTracing.Contrib.NetCore, but some classes like DiagnosticListenerObserver are defined as internal, why isn't it set to be public ? Is there something I have missed?

Another question, I saw the response of issue 12. I think there is no problem to change the project to netstandard2.0. We are a new library, don't need to think about the compatibility of .NET Framework. If set to netcoreapp2.0, it is very unfriendly for projects that need to extend OpenTracing.Contrib.NetCore.

yang-xiaodong avatar Apr 11 '18 02:04 yang-xiaodong

Hi @yuleyule66. Thanks for trying this library! Let me address your questions:

I want to add some extensions to OpenTracing.Contrib.NetCore, but some classes like DiagnosticListenerObserver are defined as internal, why isn't it set to be public ? Is there something I have missed?

This library still is at a very early stage. I still want to be able to refactor the code without breaking too many people. Using internal is an easy way to ensure that. I will make more types public once I'm confident that the architecture is stable.

Could you tell me what kind of extensions you were planning to add? Maybe it is something that's useful for everyone and could be integrated directly into this library?

Another question, I saw the response of issue 12. I think there is no problem to change the project to netstandard2.0. We are a new library, don't need to think about the compatibility of .NET Framework. If set to netcoreapp2.0, it is very unfriendly for projects that need to extend OpenTracing.Contrib.NetCore.

I added more details on why I currently only target netcoreapp2.0 in #12. If you have further feedback/comments regarding that, please post them in #12 so that we can focus on one topic per issue.

cwe1ss avatar Apr 11 '18 06:04 cwe1ss

Hi @cwe1ss,

I have similar case. I want to create DiagnosticListenerObserver for Npgsql events (NpqSql). Another option is implement in this library, but reference to Npgsql isn't good practice. From my perspective better will be separate library (e.g. OpenTracing.Contrib.NetCore.Npqsql) with implementation for npqsql. I can implement this library, but I need to have DiagnosticListenerObserver and related classes marked as public.

What do you think about this?

kreciol avatar Apr 20 '19 09:04 kreciol

Hello, i am also interested in extension functionality. Making the internal class DiagnosticListenerObserver public will help a lot.

Alksar avatar Aug 07 '19 12:08 Alksar

Hi, I also want to create DiagnosticListenerObserver for my own EventBus. If the internal class DiagnosticListenerObserver change to public will help me a lot. What's the progress of this issue?

zh6335901 avatar Nov 06 '19 14:11 zh6335901

Hello. And I also want to create my derived class from DiagnosticListenerObserver. Are there some news about this issue?

gSerP1983 avatar Dec 23 '19 12:12 gSerP1983

Really great work, I'm also want to extend DiagnosticListenerObserver for AWS SDK events.

sevaf avatar Dec 31 '19 18:12 sevaf