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

Error cause is not available in traces #1265

Closed
bobvanderlinden opened this issue Nov 26, 2020 · 2 comments · Fixed by #1472
Closed

Error cause is not available in traces #1265

bobvanderlinden opened this issue Nov 26, 2020 · 2 comments · Fixed by #1472
Assignees
Labels
community Was opened by a community member core Involves Datadog core libraries feature-request A request for a new feature or change to an existing one
Projects

Comments

@bobvanderlinden
Copy link

Currently whenever an error is raised, you can only see the class, message and backtrace of that error. However, usually the error has an underlying cause, which is another error, so it also has a class, message and backtrace.

Example, the following code will raise Wrapping exception. The .cause of this exception is Inner exception:

begin
  raise StandardError.new("Inner exception")
rescue => e
  raise StandardError.new("Wrapping exception")
end

When running this in Ruby it'll output the full exception (including the nested causes):

Traceback (most recent call last):
example.rb:2:in `<main>': Inner exception (StandardError)
        1: from example.rb:1:in `<main>'
example.rb:4:in `rescue in <main>': Wrapping exception (StandardError)

The same happens when this is raised in Rollbar. However, whenever this is raised using dd-trace-rb, only the top-most exception is logged for the trace (Wrapping exception).

It would be nice to have all causes of an exception available whenever such an exception is raised.

@marcotc
Copy link
Member

marcotc commented Dec 3, 2020

Thank you for reporting this issue @bobvanderlinden.

I agree that the top-most exception only is not enough information for proper debugging.

We'll work on augmenting the error reporting with each exception information.

@marcotc marcotc added community Was opened by a community member feature-request A request for a new feature or change to an existing one labels Dec 3, 2020
@delner delner added the core Involves Datadog core libraries label Apr 1, 2021
@delner delner added this to Needs triage in Planning via automation Apr 15, 2021
@delner delner removed this from Needs triage in Planning Apr 26, 2021
@delner delner added this to In progress in Active work Apr 26, 2021
Active work automation moved this from In progress to Resolved/Closed May 10, 2021
@ericmustin
Copy link
Contributor

👋 Hi, hope all is well, v0.49.0 is released if you'd like to upgrade and see if this resolves the issue. Cheers! https://github.com/DataDog/dd-trace-rb/releases/tag/v0.49.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Was opened by a community member core Involves Datadog core libraries feature-request A request for a new feature or change to an existing one
Projects
Active work
  
Resolved/Closed
Development

Successfully merging a pull request may close this issue.

4 participants