public function RavenSanitizeIntegration::setupOnce in Raven: Sentry Integration 7.4
File
- ./
RavenSanitizeIntegration.php, line 24
Class
- RavenSanitizeIntegration
- Sanitizes sensitive data, such as passwords, before sending to Sentry.
Code
public function setupOnce() : void {
Scope::addGlobalEventProcessor(function (Event $event) : Event {
$currentHub = SentrySdk::getCurrentHub();
$integration = $currentHub
->getIntegration(self::class);
$client = $currentHub
->getClient();
// The client bound to the current hub, if any, could not have this
// integration enabled. If this is the case, bail out.
if (NULL === $integration || NULL === $client) {
return $event;
}
$this
->processEvent($event, $client
->getOptions());
return $event;
});
}