Skip to content

Tracing

Daniel Blankensteiner edited this page Jul 8, 2021 · 4 revisions

Tracing

DotPulsar support tracing (from version 2.0.0) following the guidelines from the OpenTelemetry project.

All that's needed for tracing to work is to add the 'DotPulsar' source to OpenTelemetry's TracerProviderBuilder.

.ConfigureServices(services =>
{
    services.AddOpenTelemetryTracing(builder =>
	{
	    builder.AddSource("DotPulsar");
	});
})

For more in-depth information about OpenTelemetry for .NET you can read the getting started section and browse the git repository.

Sending a message

If the 'DotPulsar' source is active a producer trace will be created when sending messages with the producer. This will store 'traceparent' and 'tracestate' in the message's metadata.

Processing a message

If the 'DotPulsar' source is active a consumer trace will be created when processing messages with the 'Process' extension method for IConsumer<TMessage>. This will read 'traceparent' and 'tracestate' from the message's metadata.

Clone this wiki locally