getsentry / raven-go

Sentry client in Go
https://sentry.io
BSD 3-Clause "New" or "Revised" License
561 stars 147 forks source link

use the stacktrace of cause, if that doesn't have one, use the one fr… #215

Open femaref opened 5 years ago

femaref commented 5 years ago

…om err

https://github.com/getsentry/raven-go/pull/215

femaref commented 5 years ago

oh, right. I just saw that there is a reference I missed in http.go. I'll add that. Or are you talking about something different?

femaref commented 5 years ago

sure, will do.

jotto commented 5 years ago

This is a high value change.

Without this change, as far as I can tell, reporting errors via raven.CaptureError at the top of a callstack will lose their original pkgErrors.Wrap stacktrace.

femaref commented 5 years ago

yes, that is exactly what is happening.

jotto commented 5 years ago

@femaref do you mind pushing your http fix, at least to your repo? I'd like to use your branch instead of creating another one

femaref commented 5 years ago

will do once I'm back at my notebook.

femaref commented 5 years ago

@jotto actually, it's part of the refactor branch: https://github.com/femaref/raven-go/blob/refactor/transport.go

jotto commented 5 years ago

thank you @femaref

is there an intent with the refactor beyond addressing the stacktrace issue?

femaref commented 5 years ago

yes, there is a lot of duplicate code between Capture* and Capture*WithWait. I'm reducing that duplication.