Skip to content

Is it OK to set two parents to newly created span/scope? #40

Open
@bsavov

Description

@bsavov

Hello,
I'm trying to feed wavefront (using https://github.com/wavefrontHQ/wavefront-opentracing-sdk-java), but it seem when consume message from rabbitMQ, the newly created, for the purpose, span/scope has 2 parents (same data, different instance IDs).
Looking at the code:


I wonder what is the reason to add two parents to the same scope builder.
Shouldn't be only one of them?
In wavefront the span is reported with two parents like:

span.kind | "producer"
component | "rabbitmq"
spanId | "740b92bf-feb9-4de2-afea-dc673cc1b76d"
traceId | "127460d5-fcf5-4215-abe6-2f4d7cd7a6dc"
parent | "[3a2073d0-dfcf-4c35-857c-b618419088d9, 3a2073d0-dfcf-4c35-857c-b618419088d9]"

(same id, as you can see), but it seems they cannot do proper correlation and I do not get good sequence in the visual tool.

Would it make sense to add only one of them?
Or probably I'm doing something not quite as it shall be, for example where 'existingSpanContext' come from?

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting-for-feebackWe need additional information before we can continue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions