-
Notifications
You must be signed in to change notification settings - Fork 697
Change status codes from grpc status codes, remove setting status in instrumentations except on ERROR #1282
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
Changes from 17 commits
cf13537
846361b
2fc1770
533b1f0
fc842d5
0aceb53
6e55291
0659b75
72fa7fa
84251b5
fc06302
85831fd
2a4e87e
4bf4c66
28f0a12
ec1c1a5
e4f25db
1bb0309
2a56e0c
7da506d
783569d
d515597
aeeedef
13ad8b4
d1a0b5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -8,7 +8,7 @@ | |||||
TracedCursor, | ||||||
) | ||||||
from opentelemetry.trace import SpanKind | ||||||
from opentelemetry.trace.status import Status, StatusCanonicalCode | ||||||
from opentelemetry.trace.status import Status, StatusCode | ||||||
|
||||||
|
||||||
# pylint: disable=abstract-method | ||||||
|
@@ -109,12 +109,13 @@ async def traced_execution( | |||||
try: | ||||||
result = await query_method(*args, **kwargs) | ||||||
if span.is_recording(): | ||||||
span.set_status(Status(StatusCanonicalCode.OK)) | ||||||
# TODO: Remove setting status in instrumentation | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's not exactly accurate. The TODO is removing any There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update: I made the changes and will be just removing the TODOs. |
||||||
span.set_status(Status(StatusCode.UNSET)) | ||||||
toumorokoshi marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
return result | ||||||
except Exception as ex: # pylint: disable=broad-except | ||||||
if span.is_recording(): | ||||||
span.set_status( | ||||||
Status(StatusCanonicalCode.UNKNOWN, str(ex)) | ||||||
Status(StatusCode.ERROR, str(ex)) | ||||||
) | ||||||
raise ex | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this TODO required for GA? If so, may be create an issue and link it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#1294