Skip to content

Option to setup integrations filter #601

Open
@enumag

Description

@enumag

sentry-php allows integrations option to be either a custom list of integrations or a callable what can filter the existing integrations:

https://github.com/getsentry/sentry-php/blob/ea704bbe145657a507d73cd8bf6cc017d269fffa/src/Options.php#L754

I'd like to use the latter but it seems the sentry-symfony package doesn't allow this. At least we were unable to find a working configuration:

sentry:
    options:
        integration: 'App\Library\Utils\SentryIntegrationFilter'
In OptionsResolver.php line 1057:
                                                                                                                                                                                                                         
  [Symfony\Component\OptionsResolver\Exception\InvalidOptionsException]                                                                                                                                                  
  The option "integrations" with value array is expected to be of type "Sentry\Integration\IntegrationInterface[]" or "callable", but one of the elements is of type "App\Library\Utils\SentryIntegrationFilter".  

It seems like this was implemented before (#279) but got broken in 4.0? Unless my yaml is incorrect in which case please advise what's the correct way.

We want to disable the error handling integrations because they were causing weird issues for us. But we want to keep the other default integrations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions