Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Skip Capture With a Service #188

Closed
Closed
@jrjohnson

Description

@jrjohnson

We'd like to be able to skip capture globally based on configuration. It seems like we have a few paths to do that right now.

  1. Implement our own listener against the interface
  2. Extend the existing listener and just override shouldExceptionCaptureBeSkipped

Both of these require writing a lot of boilerplate, would you be open to adding an autoconfigurable interface that would allow a service to respond to shouldExceptionCaptureBeSkipped?

I also tried to listen to the pre-capture event and stop it with SentrySymfonyEvents::PRE_CAPTURE => 'onPreCapture'

public function onPreCapture(Event $event)
{
    if (!$this->errorCaptureEnabled) {
        $event->stopPropagation();
    }
}

While that method does get called, stopPropagation doesn't seem to stop the error from being sent to sentry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions