Class MetadataContextSetter

java.lang.Object
org.axonframework.extension.tracing.opentelemetry.MetadataContextSetter
All Implemented Interfaces:
io.opentelemetry.context.propagation.TextMapSetter<Map<String,String>>

public class MetadataContextSetter extends Object implements io.opentelemetry.context.propagation.TextMapSetter<Map<String,String>>
This TextMapSetter implementation is able to insert the current OpenTelemetry span context into a Message. However, since a Message is immutable, this injector injects it into the provided Map. It's the responsibility the implementing OpenTelemetrySpanFactory to mutate the message through OpenTelemetrySpanFactory.propagateContext(Message).

The trace becomes the message's parent span in itsMetadata.

Since:
4.6.0
Author:
Mitchell Herrijgers