getsentry / sentry-symfony

The official Symfony SDK for Sentry (sentry.io)
https://sentry.io
MIT License
692 stars 169 forks source link

Sentry doesn't capture events on PROD environment, but does capture on DEV environment (Check your DSN or your before_send callback if used) #766

Closed Softens closed 1 year ago

Softens commented 1 year ago

How do you use Sentry?

Sentry SaaS (sentry.io)

Versions

Steps to reproduce

  1. Run php bin/console sentry:test on the server environment
  2. Observe the following error output: Check your DSN or your before_send callback if used

Expected result

An exception should be sent to Sentry and viewable

Actual result

Local on dev environment:

DSN correctly configured in the current client
Sending test message...
Message sent successfully with ID b4445ea897cf43eb954723b953aba1ad

On server, running on PHP 8.2.11:

DSN correctly configured in the current client
Sending test message...
Message not sent!
<warning>Check your DSN or your before_send callback if used</warning>

In #533, this issue should be fixed in amphp/http-client version 4.6.1. I am using amphp/http-client version 4.6.3. I am not using a before_send callback and the DSN is set correctly. Any thoughts?

cleptric commented 1 year ago

You could set up a PSR logger as described in https://gist.github.com/stayallive/b50db0a87f1a19aaa4905ee89acaee83. This should give you more details of why your events are not sent to Sentry.

Softens commented 1 year ago

Awesome, that did a trick. image

Edit: Checked the error, found that they found it in Symfony 3 days ago, and fixed it: https://github.com/symfony/http-client/commit/ab8446f997efb9913627e9da10fa784d2182fe92 Now I have to wait for their next release.

cleptric commented 1 year ago

I am glad you were able to get to the bottom of your issue 🙂 I'll close this one, then. Let us know if anything else is coming up.