You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 23, 2023. It is now read-only.
Repository navigation
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
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?
Activity
yurishkuro commentedon May 20, 2020
Please refer to the API and not to private fields of implementation classes.
opentracing-python/opentracing/span.py
Lines 168 to 190 in aef28a7
opentracing-python/opentracing/span.py
Lines 192 to 201 in aef28a7