public class MetadataContextSetter extends Object implements io.opentelemetry.context.propagation.TextMapSetter<Map<String,String>>
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.
| Modifier and Type | Field and Description |
|---|---|
static MetadataContextSetter |
INSTANCE
Singleton instance of the
MetadataContextSetter, used by the OpenTelemetrySpanFactory. |
| Modifier and Type | Method and Description |
|---|---|
void |
set(Map<String,String> metadata,
String key,
String value) |
public static final MetadataContextSetter INSTANCE
MetadataContextSetter, used by the OpenTelemetrySpanFactory.Copyright © 2010–2023. All rights reserved.