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

Add Datadog::Error value-object #181

Merged
merged 1 commit into from
Aug 31, 2017
Merged

Conversation

p-lambert
Copy link
Member

@p-lambert p-lambert commented Aug 28, 2017

This ensures all error-related data is properly encoded.

@p-lambert p-lambert force-pushed the pedro/fix-error-handling branch 8 times, most recently from 390caff to 46a6790 Compare August 29, 2017 05:10
@palazzem palazzem added the bug Involves a bug label Aug 29, 2017
@palazzem palazzem added this to the 0.8.2 milestone Aug 29, 2017
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.

Only one question otherwise it seems good to me. Also I found an issue with a Sinatra test:

  1) Failure:
TracerTest#test_error [/home/ubuntu/dd-trace-rb/test/contrib/sinatra/tracer_test.rb:99]:
Expected: 1
  Actual: 0

Can you take a look? In the meantime I launched again the CI to be sure it's not a flaky test (but probably it isn't).

Thank you for spotting this issue!

@@ -108,7 +108,7 @@ class TracingControllerTest < ActionController::TestCase
assert_equal(1, span.status, 'span should be flagged as an error')
assert_equal('ZeroDivisionError', span.get_tag('error.type'), 'type should contain the class name of the error')
assert_equal('divided by 0', span.get_tag('error.msg'), 'msg should state we tried to divided by 0')
assert_nil(span.get_tag('error.stack'))
assert_empty(span.get_tag('error.stack'))
Copy link
Contributor

Choose a reason for hiding this comment

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

why it has been changed? assert_nil ensures that get_tag() returns nil. assert_empty does the same? because we must not have the error.stack set, otherwise if we have (for instance) "", it ends in sending wrong data.

@p-lambert p-lambert force-pushed the pedro/fix-error-handling branch 4 times, most recently from b138116 to 51ff1c3 Compare August 29, 2017 22:14
@p-lambert p-lambert merged commit 165af46 into master Aug 31, 2017
@palazzem palazzem deleted the pedro/fix-error-handling branch October 6, 2017 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Involves a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants