Stars: 1744
Forks: 466
Pull Requests: 976
Issues: 580
Watchers: 88
Last Updated: 2023-09-15 13:51:57
The official PHP SDK for Sentry (sentry.io)
License: MIT License
Languages: Makefile, PHP, Shell
Bad software is everywhere, and we're tired of it. Sentry is on a mission to help developers write better software faster, so we can get back to enjoying technology. If you want to join us Check out our open positions
The Sentry PHP error reporter tracks errors and exceptions that happen during the execution of your application and provides instant notification with detailed information needed to prioritize, identify, reproduce and fix each issue.
To install the SDK you will need to be using Composer in your project. To install it please see the docs.
This is our "core" SDK, meaning that all the important code regarding error handling lives here.
If you are happy with using the HTTP client we recommend install the SDK like: sentry/sdk
composer require sentry/sdk
This package (sentry/sentry
) is not tied to any specific library that sends HTTP messages. Instead,
it uses Httplug to let users choose whichever
PSR-7 implementation and HTTP client they want to use.
If you just want to get started quickly you should run the following command:
composer require sentry/sentry php-http/curl-client
This is basically what our metapackage (sentry/sdk
) provides.
This will install the library itself along with an HTTP client adapter that uses
cURL as transport method (provided by Httplug). You do not have to use those
packages if you do not want to. The SDK does not care about which transport method
you want to use because it's an implementation detail of your application. You may
use any package that provides php-http/async-client-implementation
and http-message-implementation
.
\Sentry\init(['dsn' => '___PUBLIC_DSN___' ]);
try {
thisFunctionThrows(); // -> throw new \Exception('foo bar');
} catch (\Exception $exception) {
\Sentry\captureException($exception);
}
The following integrations are fully supported and maintained by the Sentry team.
The following integrations are available and maintained by members of the Sentry community.
Please refer to CONTRIBUTING.md.
If you need help setting up or configuring the PHP SDK (or anything else in the Sentry universe) please head over to the Sentry Community on Discord. There is a ton of great people in our Discord community ready to help you!
Licensed under the MIT license, see LICENSE