Closed baschny closed 1 year ago
At first, thanks for the PR, but do we really need it?
Currently an empty dsn
with $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['sentry_client']['dsn']
or an empty env variable SENTRY_DSN=""
should deactivate the Sentry client.
Doesn't it work ? See https://github.com/networkteam/sentry_client/blob/master/Classes/Client.php#L40
It deactivates the client, but it does not deactivate the integration, meaning that ProductionExceptionHandler and also the Logwriter configuration is still going to Sentry (instead of a File).
I would be ok that if the "dsn" is not set, the integration (i.e. the hooks registration in ext_localconf.php) does not kick in by default, my change was meant to be as backwards compatible as possible.
Context based configuration is now possible with v5.0.0. Please create a new issue given something is still wrong
Allow switching it off via extension configuration (
disableSentry
) or environment variable (SENTRY_DISABLE
). Default is backwards compatible (enabled).Either set the environment variable:
Or set it in TYPO3 based on some condition, for example in your
AdditionalConfiguration.php
akaconfig/system/additional.php
:Resolves #85