Closed
Description
[Environment]
python==3.7.1
opentelemetry-api==1.7.1
opentelemetry-exporter-jaeger==1.7.1
opentelemetry-propagator-jaeger==1.7.1
opentelemetry-sdk==1.7.1
OTEL_TRACES_SAMPLER=traceidratio
OTEL_TRACES_SAMPLER_ARG=0
[Issue]
0 rate for TraceIdRatioBased sampler to create the NonRecordingSpan, which with no parent
attribute.
Then I try to inject carrier with Jaeger Propagator. Following exception happened:
'NonRecordingSpan' object has no attribute 'parent' File "/usr/local/lib/python3.7/dist-packages/opentelemetry/propagators/jaeger/__init__.py", line 84, in inject span_parent_id = span.parent.span_id if span.parent else 0
[expected behavior]
It should return with empty carrier without any exception.