getsentry / raven-go

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

Error not being logged to Sentry. #149

Closed jeffreyyong closed 7 years ago

jeffreyyong commented 7 years ago
    raven.SetDSN("******")

    raven.CapturePanic(func() {
        _, err := os.Open("non-existent-file")

        if err != nil {
            log.Fatal("panic string")
            panic("panic string")
        }
    }, nil)

I put the right DSN for sentry and I try to open a non-existent file to force the error to happen. I am wondering why nothing is being logged to my sentry account?

mattrobenolt commented 7 years ago

Is your program exiting before it is delivered? Try using CapturePanicAndWait

jeffreyyong commented 7 years ago

I tried using CapturePanicAndWait method but it's still not working. I will try again