networkteam / sentry_client

TYPO3 Extension for exception logging with sentry, see http://www.getsentry.com
33 stars 36 forks source link

Missing support for Sentry Web Vitals #97

Closed alexanderschnitzler closed 5 months ago

alexanderschnitzler commented 5 months ago

Hi folks,

in order to allow profiling, the configuration option traces_sample_rate needs to be set which is currently not possible as the set of options is controlled by this package. See https://docs.sentry.io/platforms/php/performance/ for reference.

It would be nice if the package supported either adding arbitrary configuration or the full set of options sentry offers. Especially this option should be easy to pass through via EXTCONF.

Greetings, Alex

christophlehmann commented 5 months ago

Hi Alex,

it's possible, see Readme:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sentry_client']['options']['server_name'] = 'web3';

alexanderschnitzler commented 5 months ago

Hi Christoph,

my bad, I totally missed that yesterday when I quickly browsed the code. Found this in a couple of seconds now:

if (is_array($extConf['options'] ?? null)) {
    $options = array_merge($options, $extConf['options']);
}
if (is_callable($extConf['modifyOptions'] ?? null)) {
    $options = call_user_func($extConf['modifyOptions'], $options);
}

Thanks!