![](/style/images/good.png)
![](/style/images/bad.png)
Diagnostics and Instrumentation Packages for MongoDB and NServiceBus Published
source link: https://jimmybogard.com/diagnostics-and-instrumentation-for-mongodb-and-nservicebus/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Diagnostics and Instrumentation Packages for MongoDB and NServiceBus Published
As part of the end-to-end diagnostics and tracing blog series, I had an end goal of eventually publishing out NuGet packages for diagnostics (Activity and DiagnosticSource). I'm happy to announce that I've released 4 packages to NuGet:
These packages add:
With the diagnostics packages, you can write your own DiagnosticListener
s to subscribe to diagnostics Activity events. The OpenTelemetry packages listen to these Activity events and adapt them to OpenTelemetry spans. The various existing exporters can output these spans to Zipkin, Jaeger, Application Insights, and many other observability tools.
I've updated the ReadMe's for each repo to include instructions for how to use:
With these packages, you can easily configure OpenTelemetry to include MongoDB and NServiceBus support:
services.AddOpenTelemetry(builder =>
builder
.UseZipkin(o =>
{
o.Endpoint = new Uri("http://localhost:9411/api/v2/spans");
o.ServiceName = EndpointName;
})
.AddNServiceBusAdapter(opt => opt.CaptureMessageBody = true)
.AddMongoDBAdapter(opt => opt.CaptureCommandText = true)
.AddRequestAdapter()
.AddDependencyAdapter(configureSqlAdapterOptions: opt => opt.CaptureTextCommandContent = true);
);
Enjoy!
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK