-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Does setting span status to Error automatically create span event? #4823
Comments
Thanks for raising this @cheempz! @reese-lee @avillela can you verify if this is somewhere defined in the spec and just not available in Python, or if this is not in the spec? If it is in the spec, we can raise an issue with python or check if one exists already and close this issue |
@open-telemetry/python-approvers if someone can take a look and help with answering this question, this would be great/can help to expedite the investigation |
I don't think we have that kind of magic in Python other than sdk's Span constructor will add to the span every event it get passed to it. |
It's a convention in instrumentations to create a span event with a stack trace (or other error details), so that may be what was referred to? There's nothing inherent in OTel SDKs that create a span event automatically, though. |
Apologies - I think the wording we used might have been a bit confusing. From my understanding in Python, if you have:
and your span throws an exception, then that span will be marked as an error span. I believe that tracks with the above comments? If so, I'm happy to modify that sentence in the blog post to clarify the confusion. |
Thanks everyone. From the response so far it seems safe to say that various SDKs and instrumentations may automatically collect span |
@avillela can you take a look at your blog post and figure out if the sentence can be rephrased to match what is discussed here. As a quick fix, I am also OK with removing the sentence entirely.
That's my understanding as well, yes. |
Closing as completed by #4844. |
Original slack post, links changed to relative repo paths:
Just read the excellent article about errors and there's something puzzling me, really appreciate if someone can help clarify. the blog mentioned here and restated similar behaviour here:
is this something specified in the tracing API or SDK specs, or implicitly for autoinstrumentation libraries to do if it collects a span and sets Error status on it? from quick scan of specs and Python SDK implementation i'm not seeing anything.
thanks!
What needs to be changed? Per @svrnm please verify if there is something in the blog post that needs to be fixed or if a reference to the spec is missing.
The text was updated successfully, but these errors were encountered: