Class KafkaSpanDecorator
- java.lang.Object
-
- org.apache.camel.tracing.decorators.AbstractSpanDecorator
-
- org.apache.camel.tracing.decorators.AbstractMessagingSpanDecorator
-
- org.apache.camel.tracing.decorators.KafkaSpanDecorator
-
- All Implemented Interfaces:
SpanDecorator
public class KafkaSpanDecorator extends AbstractMessagingSpanDecorator
-
-
Field Summary
Fields Modifier and Type Field Description static StringKAFKA_KEY_TAGstatic StringKAFKA_OFFSET_TAGstatic StringKAFKA_PARTITION_KEY_TAGstatic StringKAFKA_PARTITION_TAGprotected static StringKEYprotected static StringOFFSETprotected static StringOVERRIDE_TOPICprotected static StringPARTITIONprotected static StringPARTITION_KEYConstants copied fromorg.apache.camel.component.kafka.KafkaConstants-
Fields inherited from class org.apache.camel.tracing.decorators.AbstractMessagingSpanDecorator
MESSAGE_BUS_ID
-
Fields inherited from interface org.apache.camel.tracing.SpanDecorator
CAMEL_COMPONENT, DEFAULT
-
-
Constructor Summary
Constructors Constructor Description KafkaSpanDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetComponent()The camel component name associated with the decorator.StringgetComponentClassName()The camel component FQN classname associated with the decorator.StringgetDestination(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)This method identifies the destination from the supplied exchange and/or endpoint.voidpre(SpanAdapter span, org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)This method adds appropriate details (tags/logs) to the supplied span based on the pre processing of the exchange.-
Methods inherited from class org.apache.camel.tracing.decorators.AbstractMessagingSpanDecorator
getExtractAdapter, getInitiatorSpanKind, getInjectAdapter, getMessageId, getOperationName, getReceiverSpanKind
-
Methods inherited from class org.apache.camel.tracing.decorators.AbstractSpanDecorator
newSpan, post, stripSchemeAndOptions, toQueryParameters
-
-
-
-
Field Detail
-
KAFKA_PARTITION_TAG
public static final String KAFKA_PARTITION_TAG
- See Also:
- Constant Field Values
-
KAFKA_PARTITION_KEY_TAG
public static final String KAFKA_PARTITION_KEY_TAG
- See Also:
- Constant Field Values
-
KAFKA_KEY_TAG
public static final String KAFKA_KEY_TAG
- See Also:
- Constant Field Values
-
KAFKA_OFFSET_TAG
public static final String KAFKA_OFFSET_TAG
- See Also:
- Constant Field Values
-
PARTITION_KEY
protected static final String PARTITION_KEY
Constants copied fromorg.apache.camel.component.kafka.KafkaConstants- See Also:
- Constant Field Values
-
PARTITION
protected static final String PARTITION
- See Also:
- Constant Field Values
-
KEY
protected static final String KEY
- See Also:
- Constant Field Values
-
OVERRIDE_TOPIC
protected static final String OVERRIDE_TOPIC
- See Also:
- Constant Field Values
-
OFFSET
protected static final String OFFSET
- See Also:
- Constant Field Values
-
-
Method Detail
-
getComponent
public String getComponent()
Description copied from interface:SpanDecoratorThe camel component name associated with the decorator.- Returns:
- The camel component name
-
getComponentClassName
public String getComponentClassName()
Description copied from interface:SpanDecoratorThe camel component FQN classname associated with the decorator.- Returns:
- The camel component FQN classname
-
getDestination
public String getDestination(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
Description copied from class:AbstractMessagingSpanDecoratorThis method identifies the destination from the supplied exchange and/or endpoint.- Overrides:
getDestinationin classAbstractMessagingSpanDecorator- Parameters:
exchange- The exchangeendpoint- The endpoint- Returns:
- The message bus destination
-
pre
public void pre(SpanAdapter span, org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
Description copied from interface:SpanDecoratorThis method adds appropriate details (tags/logs) to the supplied span based on the pre processing of the exchange.- Specified by:
prein interfaceSpanDecorator- Overrides:
prein classAbstractMessagingSpanDecorator- Parameters:
span- The spanexchange- The exchangeendpoint- The endpoint
-
-