Skip to content
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

opentracing: set Span error when adding error tags #154

Merged
merged 1 commit into from
Jan 18, 2018

Conversation

gbbr
Copy link
Contributor

@gbbr gbbr commented Jan 17, 2018

This change allows setting a tag of name Error ("error") having a value
of error (but covers for other types to) which will in turn set the
error properties of the Span internally.

Fixes #144

@gbbr gbbr added bug unintended behavior that has to be fixed community labels Jan 17, 2018
@gbbr gbbr added this to the 0.6.1 milestone Jan 17, 2018
@gbbr gbbr requested a review from palazzem January 17, 2018 16:32
@@ -64,6 +65,9 @@ func (s *Span) SetTag(key string, value interface{}) ot.Span {
s.Span.Lock()
defer s.Span.Unlock()
s.Span.Type = fmt.Sprint(value)
case ErrorMsg, ErrorType, ErrorStack:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we've discussed you can pass the actual Error so SetError will be used

@gbbr gbbr force-pushed the gbbr/opentracing-error branch 2 times, most recently from f2e3cdf to 88408d7 Compare January 18, 2018 22:41
This change allows setting a tag of name Error ("error") having a value
of error (but covers for other types to) which will in turn set the
error properties of the Span internally.

Fixes #144
Copy link
Contributor

@palazzem palazzem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! let's write a code example in the referenced issue. Thank you very much!

@palazzem palazzem merged commit 13a701f into master Jan 18, 2018
@palazzem palazzem deleted the gbbr/opentracing-error branch January 18, 2018 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unintended behavior that has to be fixed community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants