use of org.apache.camel.tracing.decorators.PlatformHttpSpanDecorator in project camel-quarkus by apache.
the class CamelQuarkusOpenTelemetryTracer method startExchangeBeginSpan.
@Override
protected SpanAdapter startExchangeBeginSpan(Exchange exchange, SpanDecorator sd, String operationName, SpanKind kind, SpanAdapter parent) {
// augment the existing incoming one with additional camel specific tags & attributes
if (sd instanceof PlatformHttpSpanDecorator || sd instanceof ServletSpanDecorator) {
Span span = Span.fromContext(Context.current());
Baggage baggage = Baggage.fromContext(Context.current());
return new OpenTelemetrySpanAdapter(span, baggage);
}
return super.startExchangeBeginSpan(exchange, sd, operationName, kind, parent);
}
Aggregations