opencensus-python icon indicating copy to clipboard operation
opencensus-python copied to clipboard

#279 Add new method to set span status.

Open maeserichar opened this issue 6 years ago • 7 comments

Just an easy change to avoid needing to import status in order to set the status of a span.

maeserichar avatar Oct 05 '19 17:10 maeserichar

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

googlebot avatar Oct 05 '19 18:10 googlebot

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

googlebot avatar Oct 06 '19 16:10 googlebot

This was partially discussed here!

@reyang What do you think?

victoraugustolls avatar Oct 09 '19 16:10 victoraugustolls

With this change, is there a need for the Status class? What do you think @victoraugustolls @reyang ?

EDIT: Just saw the previous thread, this seems fine. Also, just realized removing Status would be a breaking change.

lzchen avatar Oct 09 '19 17:10 lzchen

This seems to me more like a helper method, and I wouldn't remove Status class, as not only it is a breaking change but is referenced in OT spec as mandatory, and it would make the job a lot difficult in the migration in case it was removed.

In my opinion, I would rather have utils method and not add it inside the Span class, but it is a personal view, would wait @reyang for comments.

victoraugustolls avatar Oct 09 '19 18:10 victoraugustolls

I agree with @victoraugustolls.

reyang avatar Oct 09 '19 21:10 reyang

Great! So something in the line of setSpanStatus(span, code, message, details) in `trace/utils.py' would be more aligned with that?

maeserichar avatar Oct 10 '19 07:10 maeserichar