Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

rebus-org/Rebus.OpenTelemetry

Repository files navigation

Rebus.OpenTelemetry

Makes Rebus emit Diagnostic traces, which OpenTelemetry can be used to generate tracing.

Usage

Add the packages:

Rebus.Diagnostics
Rebus.OpenTelemetry

When configuring Rebus call EnableDiagnosticSources like this:

using var publisherActivator = new BuiltinHandlerActivator();

var bus = Configure.With(publisherActivator)
    .Transport(t => t.UseInMemoryTransport(new InMemNetwork(), "Messages"))
    .Options(o => o.EnableDiagnosticSources()) // This is the important line
    .Start();

Then add Rebus tracing to your OpenTelemetry calls, by doing AddRebusInstrumentation:

var tracerProvider = Sdk.CreateTracerProviderBuilder()
                .AddRebusInstrumentation()
                .Build()

And then everything should just work. 🙂

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 9

Morty Proxy This is a proxified and sanitized view of the page, visit original site.