Do we have any feature in this module through which we can send additional data as well to Sentry? For eg: The messages in the status report or some custom statistics via some hook/plugin/subscriber?

CommentFileSizeAuthor
#3 more-docs.patch2.61 KBmfb

Comments

gaurav.kapoor created an issue. See original summary.

mfb’s picture

Component: Code » Documentation

As mentioned in the "USAGE" section of the README, you can use all the typical Sentry APIs with this module. Here are some examples from the Sentry docs:

\Sentry\configureScope(function (\Sentry\State\Scope $scope): void {
  $scope->setTag('page.locale', 'de-at');
  $scope->setContext('character', [
    'name' => 'Mighty Fighter',
    'age' => 19,
    'attack_type' => 'melee'
  ]);
}); 

Other Sentry APIs available to you include setting up an event processor (you can see how the various integrations included with Sentry SDK and Raven module do this).

In addition, for events captured thru Drupal logger, this module provides hook_raven_filter_alter() thru which Sentry events are passed, so you can use this hook to call methods on the \Sentry\Event that is about to be captured. We may need to improve the documentation a bit here :)

mfb’s picture

Version: 3.2.9 » 3.x-dev
Status: Active » Needs review
StatusFileSize
new2.61 KB

  • mfb committed b2dc937 on 3.x
    Issue #3254091 by mfb: Can we send additional data to Sentry?
    
mfb’s picture

Status: Needs review » Fixed

  • mfb committed b54e55f on 3.x
    Issue #3254091 by mfb: Add another example
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.