Package org.apache.camel.tracing
Interface SpanDecorator
- All Known Implementing Classes:
AbstractHttpSpanDecorator,AbstractInternalSpanDecorator,AbstractMessagingSpanDecorator,AbstractSpanDecorator,ActiveMQ6SpanDecorator,ActiveMQSpanDecorator,AhcSpanDecorator,AmqpSpanDecorator,AzureServiceBusSpanDecorator,CometdSpanDecorator,CometdsSpanDecorator,CqlSpanDecorator,DirectSpanDecorator,DisruptorSpanDecorator,DisruptorvmSpanDecorator,ElasticsearchSpanDecorator,FileSpanDecorator,FtpSpanDecorator,FtpsSpanDecorator,HttpSpanDecorator,HttpsSpanDecorator,IronmqSpanDecorator,JdbcSpanDecorator,JettySpanDecorator,JmsSpanDecorator,KafkaSpanDecorator,LogSpanDecorator,MongoDBSpanDecorator,NatsSpanDecorator,NettyHttpSpanDecorator,Paho5SpanDecorator,PahoSpanDecorator,PlatformHttpSpanDecorator,RestOpenapiSpanDecorator,RestSpanDecorator,SchedulerSpanDecorator,SedaSpanDecorator,ServletSpanDecorator,SftpSpanDecorator,Sjms2SpanDecorator,SjmsSpanDecorator,SpringRabbitmqSpanDecorator,SqlSpanDecorator,StompSpanDecorator,TimerSpanDecorator,UndertowSpanDecorator,VertxHttpSpanDecorator
public interface SpanDecorator
This interface represents a decorator specific to the component/endpoint being instrumented.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionThe camel component name associated with the decorator.The camel component FQN classname associated with the decorator.getExtractAdapter(Map<String, Object> map, boolean encoding) This method returns the map to be used for headers extraction when the component is receiving a communication.This method returns the 'span.kind' value for use when the component is initiating a communication.getInjectAdapter(Map<String, Object> map, boolean encoding) This method returns the map to be used for headers injection when the component is receiving a communication.getOperationName(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint) This method returns the operation name to use with the Span representing this exchange and endpoint.This method returns the 'span.kind' value for use when the component is receiving a communication.booleannewSpan()This method indicates whether the component associated with the SpanDecorator should result in a new span being created.voidpost(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 post processing of the exchange.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.
-
Field Details
-
CAMEL_COMPONENT
- See Also:
-
DEFAULT
-
-
Method Details
-
newSpan
boolean newSpan()This method indicates whether the component associated with the SpanDecorator should result in a new span being created.- Returns:
- Whether a new span should be created
-
getComponent
String getComponent()The camel component name associated with the decorator.- Returns:
- The camel component name
-
getComponentClassName
String getComponentClassName()The camel component FQN classname associated with the decorator.- Returns:
- The camel component FQN classname
-
getOperationName
This method returns the operation name to use with the Span representing this exchange and endpoint.- Parameters:
exchange- The exchangeendpoint- The endpoint- Returns:
- The operation name
-
pre
This method adds appropriate details (tags/logs) to the supplied span based on the pre processing of the exchange.- Parameters:
span- The spanexchange- The exchangeendpoint- The endpoint
-
post
This method adds appropriate details (tags/logs) to the supplied span based on the post processing of the exchange.- Parameters:
span- The spanexchange- The exchangeendpoint- The endpoint
-
getInitiatorSpanKind
SpanKind getInitiatorSpanKind()This method returns the 'span.kind' value for use when the component is initiating a communication.- Returns:
- The kind
-
getReceiverSpanKind
SpanKind getReceiverSpanKind()This method returns the 'span.kind' value for use when the component is receiving a communication.- Returns:
- The kind
-
getExtractAdapter
This method returns the map to be used for headers extraction when the component is receiving a communication.- Parameters:
map- a map containing the objectsencoding- whether the headers are encoded- Returns:
- The extraction map
-
getInjectAdapter
This method returns the map to be used for headers injection when the component is receiving a communication.- Parameters:
map- a map containing the objectsencoding- whether the headers are encoded- Returns:
- The injection map
-