This is for Sentry (Open-source error tracking)
users.
I have tried some code, but I don't get success. I hope you could look into this.
Thanks to everyone in advance.
I have download the SDK zip and upload it on servers. Well, I have read from some stuff for autoloader and raven_client but still, I don't find autoloder.php.
I am using sentry/sdk:2.0.3
require_once 'sentry-php-master/src/Sdk.php';
Sentry\init(['dsn' => '___DSN___' ]);
throw new Exception("My first Sentry error!");
I am expecting it works and I can trace the errors.
Why aren't you using composer ?
Composer solves a number of problems including dependency resolution for PHP packages, keeping all packages updated and another benefit of using composer is autoloading.
I would suggest the following approach:
composer require sentry/sdk:2.1.0
in your project's root directory. require_once __DIR__ . '/vendor/autoload.php';
Connect the SDK to Sentry
Sentry\init(['dsn' =>
'https://[email protected]/18xxx47']);
Lastly, verify your setup by triggering a PHP exception by throwing one as you've already done with throw new Exception("My first Sentry error!");
Docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With