You are here

function raven_extra_context in Raven: Sentry Integration 7.4

Same name and namespace in other branches
  1. 7.2 raven.module \raven_extra_context()
  2. 7.3 raven.module \raven_extra_context()

Appends additional context.

Parameters

array $data: Associative array of extra data.

File

./raven.module, line 348
Allows to track errors to Sentry server.

Code

function raven_extra_context(array $data = []) {
  if (raven_get_client()) {
    \Sentry\configureScope(function (Scope $scope) use ($data) : void {
      $scope
        ->setExtras($data);
    });
  }
}