Quick start

Installing Streply is very easy, regardless of the structure of your project. It only takes 3 simple steps and in 5 minutes to activate Streply in your project.

Install

At the very beginning, you need to download a library for PHP. The recommended way is to download Streply using Composer. You can also download the actual zip package from our page on GitHub.

composer require streply/streply-php

https://github.com/streply/streply-php

https://packagist.org/packages/streply/streply-php

Configure

Streply initialisations are performed using the Initialize method, which should be placed at the very beginning of the code (e.g. in the index.php file). The method receives the (string) DSN as the first parameter.

The second parameter is (array) $options, which contains the optional configuration.

Streply\Initialize('https://clientPublicKey@api.streply.com/projectId');

For more configuration options, see the Configuration tab.

Usage

Passing an exception to Streply is very simple. Simply call the Streply\Exception method in the catch instruction and pass the entire exception object to it.

try {
    if(true) {
        throw new \Exceptions\SomeException('Exception message here');
    }
} catch(\Throwable $exception) {
    Streply\Exception($exception);
}

For more information on catching errors, see the Exceptions tab.

Next step


  • Configuration
    See what configuration options you have.

  • Laravel
    The official Streply library for the Laravel framework.

  • Exceptions
    Catching errors and exceptions in PHP.

  • Activities
    Tracking and analysis of activity from PHP applications.

  • Logs
    Collecting logs from your application.