Open linusthe3rd opened 8 years ago
Is this related to #85 by any chance?
No, this is a separate issue.
On Jun 7, 2016, at 1:28 PM, Matt Robenolt notifications@github.com wrote:
Is this related to #85 by any chance?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Alright, I'll investigate this today and see what's going on.
Any updates on this? After more than 1 year this still happens. Is this project dead?
It's not dead, we just have nobody in house to work on it. If someone would like to submit a PR, I'd be happy to review.
My only guess here is CapturePanic should be happening async and not waiting for your program to exit. There are other API methods which do block. Try using CapturePanicAndWait
instead.
Nice to get response. Thanks!
I debugged into the code, and found the reason of my case was SSL certificate problem. I used self-signed certificate and trusted it in OS level, but this library is using github.com/certifi/gocertifi
which is not using OS certificates.
I forked this and removed github.com/certifi/gocertifi
to solve my issue. If you are OK with it I can send PR.
https://github.com/liuyang1204/raven-go/commit/29da4ac72a0aa52ff6540eef5e38ad0d4be6000d
The essential problem is that the HTTP error is not informed anywhere so that I can only debug into the code. It should be logged at least to STDERR.
Ah, so that makes sense.
I'd accept a PR that made supplying certificates or some options around here a configurable option. The reason certifi was added in was because users were deploying their applications into containers without any system certificates, so figured it was pretty easy to just bundle them in with it.
Found the line responsible for the missing error message problem:
https://github.com/getsentry/raven-go/blob/master/client.go#L702
The error channel is ignored by this line. And same in other methods like CapturePanicAndWait
I would like to submit a PR that outputs something when a packet cannot be delivered (it seems like I'm having exactly the same problems as @linusthe3rd), and just for future reference, a link to the actual commit with the responsible line - the problem is in the client's Capture method.
Docs say:
A channel is provided if it is important to check for a send's success
That's the error channel @liuyang1204 was talking about (yeahy) - so we just have to use it...
Gonna investigate further...
I've hit a weird issue where if I use
raven.CapturePanic
, no data is sent to the sentry server iflog.Panic
is called. I am not sure why this happens, but it seems like a bug.Environment:
Example Code:
When running this code, no exception occurs in my Sentry server. Digging into the raven codebase on my local machine, I added some print statements in
client.go:Capture
:I also added a print statement in `client.go:worker()':
Running the code with this setup, I get the following output:
As you notice, there is no print statement for
outgoing packet
. This seems to indicate that the error message packet is not being added to the channel/client.queue
and preventing the packet from being sent to the server before the program exits.