Sentry-php: \Sentry\init(['dns' => '']) triggers HttpTransport::delaySendingUntilShutdown deprecated error

Created on 23 Sep 2019  路  5Comments  路  Source: getsentry/sentry-php

After upgrading to Sentry 2.2.0 the application started sending this error:

Delaying the sending of the events using the "Sentry\Transport\HttpTransport" class is deprecated since version 2.2 and will not work in 3.0.

Only problem is the transport is initialized by Sentry itself after calling:
\Sentry\init(['dsn' => '_PUBLIC_DSN_']);

The default of delaySendingUntilShutdown = true, but I see no way to overwrite it from within sentry::init.

So sentry is triggering itself to send errors about this to sentry.io.

Any idea how to fix the sentry::init to stop this issue, for now i commented out the

@trigger_error(sprintf('Delaying the sending of the events using the...

line to stop the application from floading sentry.io

Confirmed Bug

All 5 comments

For now you can only freeze the version in composer.json
"sentry/sentry": "2.1.3"
And wait for a fix then

We are already working on the fix, 2.2.1 is minutes away, we will update the issue.

@HazAT thank you!

2.2.1 has been released containing the fix, sorry for the inconvenience and thanks for reporting.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mesilov picture mesilov  路  5Comments

caugner picture caugner  路  3Comments

anka-213 picture anka-213  路  6Comments

parichayawalia picture parichayawalia  路  3Comments

codepuncher picture codepuncher  路  6Comments