-
Notifications
You must be signed in to change notification settings - Fork 40
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
error tags #244
error tags #244
Conversation
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.
Does this still apply?
// Errors can be a flag or a detailed message.
// Empty or false-y values indicate no error.
// Any other value will mark the span to indicate an error occured.
When it's neither falsey or truthy, does it make sense to assign the error
tag's contents to error.msg
?
The code comment is still true, yes. It would be more true if we set I considered adding the "if neither truthy nor falsy, and not empty, then populate The benefit of the idea, though, is that it means the Alright, I'll try it. |
Another thought: If someone sets the |
Eh, for that we could instead encourage an |
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.
Might need refactoring at some point, but no real objection about it functionally
namespace datadog { | ||
namespace opentracing { | ||
|
||
bool stob(const std::string& str, bool fallback); | ||
bool isbool(const std::string& str); | ||
|
||
enum class Tribool { False, True, Neither }; |
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.
Not a huge fan of this, but also didn't like the other parts (that I wrote) for handling/parsing boolean values.
And its usage is isolated-enough to not be particularly concerned.
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.
Last chance for name changes. Ideas: enum class Trigun
, enum class Tribble
, enum class Tribulation
, enum class Dribble
, enum class Boolble
.
This revision makes spans aware of the
error.msg
,error.stack
, anderror.type
tags.These changes grew out of Andrew Glaude's investigation of compatibility between the C++ tracer and "error tracking": https://docs.datadoghq.com/tracing/error_tracking/.
The new behavior is best summarized by the table of test cases in the added
SECTION
of test/span_test.cpp.@ajgajg1134 (he's on vacation) FYI.
Also, when these changes are finalized, we'll want to update these docs: https://docs.datadoghq.com/tracing/trace_collection/custom_instrumentation/cpp/#set-errors-on-a-span