[ 
https://issues.apache.org/jira/browse/CAMEL-15230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17144958#comment-17144958
 ] 

Claus Ibsen commented on CAMEL-15230:
-------------------------------------

Yeah that seems correct, if the header is null, then grab from the endpoint uri.

You are welcome to work on a PR

> RabbitMqSpanDecorator - Invalid Parent Span Id when EXCHANGE_NAME header not 
> set
> --------------------------------------------------------------------------------
>
>                 Key: CAMEL-15230
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15230
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-opentracing
>    Affects Versions: 3.4.0
>            Reporter: Matt Robbins
>            Priority: Minor
>
> It seems like there is no strict requirement for _*rabbitmq.EXCHANGE_NAME*_ 
> header to set by a producer e.g. the following code "works":
> {code:java}
> from("direct:foo")
>    .to("bar.exchange?queue=bar.queue&autoDelete=false")
>    .end()
> {code}
> However in this instance a span will be created with *+null+* as the 
> operation name.
> Such spans will be ignored by the collector e.g. Jaeger, which results in 
> subsequent spans having missing parents and "invalid parent span id" warnings 
> appearing.
> Doing the following prevents this.
> {code:java}
> from("direct:foo") 
>   .setHeader("rabbitmq.EXCHANGE_NAME").simple("bar.exchange")
>   .to("bar.exchange?queue=bar.queue&autoDelete=false")
>   .end()
> {code}
> It seems like we don't necessarily need the overridden 
> _*[getDestination|https://github.com/apache/camel/blob/master/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/decorators/RabbitmqSpanDecorator.java#L39]*_
>  method in the 
> _*[RabbitMqSpanDecorator|https://github.com/apache/camel/blob/master/components/camel-opentracing/src/main/java/org/apache/camel/opentracing/decorators/RabbitmqSpanDecorator.java]*_
>  and could fall through to the base implementation?
> Happy to raise a PR but thought I would collect thoughts in case I had missed 
> some subtlety. 
>  
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to