Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15230

RabbitMqSpanDecorator - Invalid Parent Span Id when EXCHANGE_NAME header not set

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.3, 3.5.0
    • Component/s: camel-opentracing
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      It seems like there is no strict requirement for rabbitmq.EXCHANGE_NAME header to set by a producer e.g. the following code "works":

      from("direct:foo")
         .to("bar.exchange?queue=bar.queue&autoDelete=false")
         .end()
      

      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.

      from("direct:foo") 
        .setHeader("rabbitmq.EXCHANGE_NAME").simple("bar.exchange")
        .to("bar.exchange?queue=bar.queue&autoDelete=false")
        .end()
      

      It seems like we don't necessarily need the overridden getDestination method in the RabbitMqSpanDecorator 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. 

       

       

       

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mcrmfc Matt Robbins
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: