-
Notifications
You must be signed in to change notification settings - Fork 791
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
DiagnosticSource instrumentation helpers as public? #1437
Comments
Plan of action for GA Release:
The above will cleanup a lot unnecessary public API. For any other instrumentations not part of this repo: About "special" library - these are libraries which are part of .NET ecosystem itself. Its definitely possible to modify the instrumentations to ignore activity created by the library itself and start a new one using ActivitySource. We need to pursue these library owners (.NET BCL teams, Asp.Net Core teams etc) and ask to move to ActivitySource based instrumentation. Given Asp.Net Core and HttpClient/SqlClient(.NET Core) and among the most used libraries in .NET ecosystem, its probably okay to give them "special" ActivitySourceAdapter, so as to avoid the perf hit when a new activity is created. |
The contrib project is completely broken when upgrading to OTel 0.8. |
just agreeing with @ejsmith On the other hand... thank you for putting the effort on this. |
Yeah, and the thing that is really frustrating to me in projects like this where the community is kind of expected to create an ecosystem of instrumentations, but the root project cheats and makes their internals visible to themselves for their own implementations. |
Any public API shipped from this repo should be documented and must be supported long term. With this pre-req, we are evaluating all the public APIs exposed, and cutting down anything not required by the spec/not serving the primary intention of this repo. Its important to do the cleanup before GA, as we cannot make breaking changes to any public API after GA. After GA (i.e next 2-3 weeks), we can evaluate and expose more methods as public, if there is a general need for it with no good alternates. With the exception of There are no long term plan of making internalsvisible approach - its required to quickly make progress to GA. They will be removed eventually. OpenTelemetry SDK package should not have any knowledge about other packages, and the current ones are introduced to make GA progress and will be removed. As to breaking changes affecting customers/other repos- yes, this is expected as we are still beta. Please continue to expect breaking changes until GA release. |
@cijothomas I understand that you are making a commitment to supporting a public API and I appreciate that. It just raises the barrier of entry for 3rd party instrumentations and makes it harder to create them. I wish you would convert your instrumentations to see what the process is and if it's even possible to create them without making use of internalsvisibleto before you remove them from the rest of the community. In the meantime, is the best approach to just copy all these files to each project? |
For DiagnosticSource subscriptions - you are free to copy or write own listeners following .NET's guide of DiagnosticSource : https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/DiagnosticSourceUsersGuide.md There are instrumentations like Redis, SqlClient(.NET Framework), HttpWebRequest which does not rely on any internals. Also examples are provided for manual instrumentation (https://github.com/open-telemetry/opentelemetry-dotnet/tree/master/examples/MicroserviceExample/Utils/Messaging). Any 3rd party (and .NET libraries as well, as mentioned in the earlier post) can write instrumentation by just using ActivitySource API alone. It should require no dependency at all to any opentelemetry api or sdk. (With exception of Propagator) |
All DS related classes are made internal, this item can be closed. |
This folder (https://github.com/open-telemetry/opentelemetry-dotnet/tree/master/src/OpenTelemetry/Instrumentation) contains the classes which helps subscribe to DiagnosticSource based events. Its to be used by those instrumentations, which are relying on the instrumented library to publish events using DiagnosticSource. These are currently exposed as public APIs from the Otel SDK nuget.
Opening this issue, to discuss if we need to make this a public api.
Proposal:
Don't expose this as public API. The instrumentations within this repo and used a shared file, to avoid copy-paste.
For any new instrumentations, the recommended approach is to use
ActivitySource
and those libraries will not require DS subscription mechanisms anyway.The text was updated successfully, but these errors were encountered: