Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

zidad/MassTransit.ActivityTracing

Repository files navigation

This library is no longer maintained, please use https://www.nuget.org/packages/OpenTelemetry.Instrumentation.MassTransit

MassTransit.ActivityTracing

.NET Core

MassTransit W3C activity tracing/propagation

Trying to support propagating the W3C trace context traceId and spanId properties from http calls -> publisher -> consumer -> http call within MassTransit. https://masstransit-project.com/advanced/monitoring/diagnostic-source.html

Based on this MassTransit.OpenTracing: https://github.com/yesmarket/MassTransit.OpenTracing And this reference for NServiceBus: https://jimmybogard.com/building-end-to-end-diagnostics-and-tracing-a-primer-trace-context/

Use this to configure trace propagation between asynchronous message broker operations.

var bus = Bus.Factory.CreateUsingRabbitMq(cfg =>
{
   var host = cfg.Host(new Uri("rabbitmq://localhost"), h =>
   {
      h.Username(brokerSettings.UserName);
      h.Password(brokerSettings.Password);
   });

   cfg.PropagateActivityTracingContext();
});

To install from nuget:

Install-Package MassTransit.ActivityTracing

About

MassTransit W3C activity tracing/propagation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages