public abstract class AbstractSpanDecorator extends Object implements SpanDecorator
SpanDecorator
interface.CAMEL_COMPONENT, DEFAULT
Constructor and Description |
---|
AbstractSpanDecorator() |
Modifier and Type | Method and Description |
---|---|
io.opentracing.propagation.TextMap |
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.
|
String |
getInitiatorSpanKind()
This method returns the 'span.kind' value for use when the component
is initiating a communication.
|
io.opentracing.propagation.TextMap |
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.
|
String |
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.
|
String |
getReceiverSpanKind()
This method returns the 'span.kind' value for use when the component
is receiving a communication.
|
boolean |
newSpan()
This method indicates whether the component associated with the SpanDecorator
should result in a new span being created.
|
void |
post(io.opentracing.Span 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.
|
void |
pre(io.opentracing.Span 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.
|
static String |
stripSchemeAndOptions(org.apache.camel.Endpoint endpoint)
This method removes the scheme, any leading slash characters and options
from the supplied URI.
|
static Map<String,String> |
toQueryParameters(String uri) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponent
public boolean newSpan()
SpanDecorator
newSpan
in interface SpanDecorator
public String getOperationName(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
SpanDecorator
getOperationName
in interface SpanDecorator
exchange
- The exchangeendpoint
- The endpointpublic static String stripSchemeAndOptions(org.apache.camel.Endpoint endpoint)
endpoint
- The endpointpublic void pre(io.opentracing.Span span, org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
SpanDecorator
pre
in interface SpanDecorator
span
- The spanexchange
- The exchangeendpoint
- The endpointpublic void post(io.opentracing.Span span, org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
SpanDecorator
post
in interface SpanDecorator
span
- The spanexchange
- The exchangeendpoint
- The endpointpublic String getInitiatorSpanKind()
SpanDecorator
getInitiatorSpanKind
in interface SpanDecorator
public String getReceiverSpanKind()
SpanDecorator
getReceiverSpanKind
in interface SpanDecorator
public io.opentracing.propagation.TextMap getExtractAdapter(Map<String,Object> map, boolean encoding)
SpanDecorator
getExtractAdapter
in interface SpanDecorator
public io.opentracing.propagation.TextMap getInjectAdapter(Map<String,Object> map, boolean encoding)
SpanDecorator
getInjectAdapter
in interface SpanDecorator
Apache Camel