Code Monkey home page Code Monkey logo

sentry-php's Introduction

Sentry

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

Official Sentry SDK for PHP

Latest Stable Version License Total Downloads Monthly Downloads Discord

Version Build Status Code Coverage
master CI Coverage Status
develop CI Coverage Status

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.

Getting started

Install

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.

Configuration

\Sentry\init(['dsn' => '___PUBLIC_DSN___' ]);

Usage

try {
    thisFunctionThrows(); // -> throw new \Exception('foo bar');
} catch (\Exception $exception) {
    \Sentry\captureException($exception);
}

Official integrations

The following integrations are fully supported and maintained by the Sentry team.

3rd party integrations

The following integrations are available and maintained by members of the Sentry community.

3rd party integrations using old SDK 2.x

3rd party integrations using old SDK 1.x

Community

Contributing to the SDK

Please refer to CONTRIBUTING.md.

Getting help/support

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!

Resources

  • Documentation
  • Discord
  • Stack Overflow
  • Twitter Follow

License

Licensed under the BSD license, see LICENSE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.