apache/pulsar-dotpulsar

Usage of System.Diagnostics.DiagnosticsSource (5.0.1) break Azure Insights

ZamTheman opened this issue · 1 comments

After implementing the package in our project the Azure Insights stopped working. After some investigations there seems to be known known conflict when using System.Diagnostics.DiagnosticsSource.
I tested with a poc app and when bringing in just that dll (5.0.1) the insights directly stopped working in Azure.

See: https://docs.microsoft.com/en-us/azure/azure-monitor/app/status-monitor-v2-troubleshoot

Would it be possible to remove that dependancy?

Hi @ZamTheman. It's very unfortunate that Microsoft creates Azure Insights and System.Diagnostics.DiagnosticsSource and make it the user's problem when they can't coexist. I can't imagine that Microsoft thinks that is a viable long-term solution, since they are themselves contributing to the OpenTelemetry project that is using those APIs.
I think you need to compile your own version of DotPulsar without the tracing or (if even possible) look into options working with OpenTelemetry (Prometheus, Jaeger, and so on) since more and more packages will provide instrumentation using the API in System.Diagnostics.DiagnosticsSource.