-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'NonRecordingSpan' object has no attribute 'parent' #2348
Comments
We've been running into this as well. Seems like it should be a simple fix, just checking if the parent attribute is present. For now I think I'll work around it by setting a real span if it's a non-recording span. |
@bluesliverx this issue is a bit old, do you have a reproducible example that uses the latest version of our components? |
Nevermind, I see you submitted #2762, thanks! |
@ocelotl, is there info on the release schedule or is it just "whenever we feel like it"? ;) Just curious, I'm good with either way. |
[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
My Code :
[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.
The text was updated successfully, but these errors were encountered: