-
-
Notifications
You must be signed in to change notification settings - Fork 147
add support for github.com/pingcap/errors stacktraces #227
base: master
Are you sure you want to change the base?
Conversation
Actually, I thought this would work, but it looks like CaptureError is using pkgErrors.Cause(err) before calling the GetOrNewStacktrace function, so I'm going to have to investigate this a little further |
That's interesting... I'm just confused as to how that works. Looking here, it's depending on
Can you give me some background about what is going on with stackframes? I'm happy to see Raven using a more generic solution that should work for |
@coder543 Yeah, so if this is the case, we need to support a few different interfaces and signatures here. Even if we used the signature directly out of So the problem with even vendoring, is if your application uses a different version, then our code still won't work since we're still using their interface from a wrong version which won't match the real type. We haven't really regressed in functionality at least. I'd be open to just piling in a few different interfaces and type switching based on what we get to be fully flexible, and all of this can be done without vendoring in other libraries. We just need to use their interfaces. |
I tested the new version of I also agree that defining those interfaces locally makes sense to provide compatibility against a broad range of versions! |
Just came across this issue as well. Just to add my situation to the discussion, what I was doing was using |
@kamilogorek @mattrobenolt any update on this? Just curious! Having real stack traces in Sentry issues would be exceptionally helpful! |
@coder543 this feature is also covered in #242 |
PingCAP's errors package is a fork of pkg/errors that makes a few nice improvements, like being able to call
errors.AddStack(err)
several times at different levels of the call stack without overwriting any existing stacktrace, since it checks whether one is already associated with the error before capturing and storing a new one.Their package is not as widely used as pkg/errors, but hopefully this patch is small enough to be merged in!