You are here

function hook_raven_options_alter in Raven: Sentry Integration 8.2

Same name and namespace in other branches
  1. 3.x raven.api.php \hook_raven_options_alter()

Alter Sentry PHP client options.

Parameters

array $options: The options to be passed to Raven_Client::__construct().

For example, $options['processorOptions']['Drupal\raven\Processor\SanitizeDataProcessor']['fields_re'] can be used to pass a regular expression for fields, headers, cookies, etc. to be sanitized. Start with the default regular expression '/(SESS|pass|authorization|password|passwd|secret|password_confirmation|card_number|auth_pw)/i' and add any additional strings.

See also

\Drupal\raven\Logger\Raven::log()

1 invocation of hook_raven_options_alter()
Raven::setClient in src/Logger/Raven.php
Creates Sentry client based on config and any alter hooks.

File

./raven.api.php, line 85
Hooks provided by the Raven module.

Code

function hook_raven_options_alter(array &$options) {
  $options['environment'] = getenv('SENTRY_CURRENT_ENV');
}