We use OpenTracing and opentracing-contrib package for instrumentation of asp.net core application that uses MongoDB.
Opentracing-contrib docs says:
It will create a span for every Activity
It provides code to process any arbitary Activity but in fact it uses DiagnosticSource to subscribe and handle events. As far as I understand Activity does not send start and stop events to DiagnosticSource automatically. It requires DiagnosticSource.StartActivity(Activity, object) to be called.
We could make to packages works together if send start and stop Activity events to DiagnosticSource by StartActivity and StopActivity methods.
Drawback is that we will still need dummy ActivityListener for MongoDB.Driver.Core.Extensions.DiagnosticSources source.
We use OpenTracing and opentracing-contrib package for instrumentation of asp.net core application that uses MongoDB.
Opentracing-contrib docs says:
It provides code to process any arbitary Activity but in fact it uses DiagnosticSource to subscribe and handle events. As far as I understand Activity does not send start and stop events to DiagnosticSource automatically. It requires
DiagnosticSource.StartActivity(Activity, object)
to be called.We could make to packages works together if send start and stop Activity events to DiagnosticSource by StartActivity and StopActivity methods.
Drawback is that we will still need dummy ActivityListener for MongoDB.Driver.Core.Extensions.DiagnosticSources source.