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 String
KAFKA_KEY_TAG
static String
KAFKA_OFFSET_TAG
static String
KAFKA_PARTITION_KEY_TAG
static String
KAFKA_PARTITION_TAG
protected static String
KEY
protected static String
OFFSET
protected static String
PARTITION
protected static String
PARTITION_KEY
Constants copied fromorg.apache.camel.component.kafka.KafkaConstants
protected static String
TOPIC
-
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 String
getComponent()
The camel component name associated with the decorator.String
getComponentClassName()
The camel component FQN classname associated with the decorator.String
getDestination(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
This method identifies the destination from the supplied exchange and/or endpoint.void
pre(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
-
TOPIC
protected static final String 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:SpanDecorator
The camel component name associated with the decorator.- Returns:
- The camel component name
-
getComponentClassName
public String getComponentClassName()
Description copied from interface:SpanDecorator
The 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:AbstractMessagingSpanDecorator
This method identifies the destination from the supplied exchange and/or endpoint.- Overrides:
getDestination
in 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:SpanDecorator
This method adds appropriate details (tags/logs) to the supplied span based on the pre processing of the exchange.- Specified by:
pre
in interfaceSpanDecorator
- Overrides:
pre
in classAbstractMessagingSpanDecorator
- Parameters:
span
- The spanexchange
- The exchangeendpoint
- The endpoint
-
-