As far as I know, there are two ways to register a new integration into the client:
integrations array in config/sentry.php;\Sentry\Laravel\ServiceProvider::configureAndRegisterClient method and add integration instances at this line https://github.com/getsentry/sentry-laravel/blob/master/src/Sentry/Laravel/ServiceProvider.php#L113 .But both ways are not good enough:
\Sentry\Laravel\ServiceProvider::configureAndRegisterClient method into my own ServiceProvider class, it told me that ClientBuilder::setSdkIdentifier and ClientBuilder::setSdkVersion method are internal (they are not defined as private but there is @internal annotation).So I wonder if there is an elegant way to add a new integration which has third-part dependence?
@leo108 thanks for bringing this up, I am working on a PR (#239) that should solve this issue.
The setSdkIdentifier & setSdkVersion are marked as @internal because they should only be used by library authors and not by end users since they identify the SDK to the Sentry server and should not be changed by the user.
Most helpful comment
@leo108 thanks for bringing this up, I am working on a PR (#239) that should solve this issue.
The
setSdkIdentifier&setSdkVersionare marked as@internalbecause they should only be used by library authors and not by end users since they identify the SDK to the Sentry server and should not be changed by the user.