Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.
This repository was archived by the owner on May 23, 2023. It is now read-only.

MockTracer cannot start span with a parent span #132

@moonshine-fish

Description

@moonshine-fish

if parent_ctx._baggage is not None:

If I want to test with MockTracer, and in my business code it calls start_span with child_of parameter, an error will occur as original SpanContext doesn't have _baggage property

        # Assemble the child ctx
        ctx = SpanContext(span_id=self._generate_id())
        if parent_ctx is not None:
>           if parent_ctx._baggage is not None:
E           AttributeError: 'SpanContext' object has no attribute '_baggage'

opentracing.mocktracer.SpanContext has _baggage property, but how can I use it in my business code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions