Package io.opentelemetry.contrib.awsxray
Class AttributePropagatingSpanProcessor
java.lang.Object
io.opentelemetry.contrib.awsxray.AttributePropagatingSpanProcessor
- All Implemented Interfaces:
io.opentelemetry.sdk.trace.SpanProcessor,Closeable,AutoCloseable
@Immutable
public final class AttributePropagatingSpanProcessor
extends Object
implements io.opentelemetry.sdk.trace.SpanProcessor
AttributePropagatingSpanProcessor handles the propagation of attributes from parent spans to
child spans, specified in
attributesKeysToPropagate. AttributePropagatingSpanProcessor
also propagates the parent span name to child spans, as a new attribute specified by spanNamePropagationKey. Span name propagation only starts from local root server/consumer
spans, but from there will be propagated to any descendant spans.-
Method Summary
Modifier and TypeMethodDescriptioncreate(io.opentelemetry.api.common.AttributeKey<String> spanNamePropagationKey, List<io.opentelemetry.api.common.AttributeKey<String>> attributesKeysToPropagate) booleanbooleanvoidonEnd(io.opentelemetry.sdk.trace.ReadableSpan span) voidonStart(io.opentelemetry.context.Context parentContext, io.opentelemetry.sdk.trace.ReadWriteSpan span) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.opentelemetry.sdk.trace.SpanProcessor
close, forceFlush, shutdown
-
Method Details
-
create
public static AttributePropagatingSpanProcessor create(io.opentelemetry.api.common.AttributeKey<String> spanNamePropagationKey, List<io.opentelemetry.api.common.AttributeKey<String>> attributesKeysToPropagate) -
onStart
public void onStart(io.opentelemetry.context.Context parentContext, io.opentelemetry.sdk.trace.ReadWriteSpan span) - Specified by:
onStartin interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
isStartRequired
public boolean isStartRequired()- Specified by:
isStartRequiredin interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
onEnd
public void onEnd(io.opentelemetry.sdk.trace.ReadableSpan span) - Specified by:
onEndin interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
isEndRequired
public boolean isEndRequired()- Specified by:
isEndRequiredin interfaceio.opentelemetry.sdk.trace.SpanProcessor
-