baraja-core/tracy-sentry-bridge

There is no license information available for the latest version (v1.0.1) of this package.

The package provides an easy connection between Tracy and Sentry.

v1.0.1 2022-04-10 17:42 UTC

This package is auto-updated.

Last update: 2024-04-08 17:07:29 UTC


README

The package provides an easy connection between Tracy and Sentry.

📦 Installation

It's best to use Composer for installation, and you can also find the package on Packagist and GitHub.

To install, simply use the command:

$ composer require baraja-core/tracy-sentry-bridge

You can use the package manually by creating an instance of the internal classes, or register a DIC extension to link the services directly to the Nette Framework.

How to use

In your project Bootstrap:

public static function boot(): Configurator
{
    $configurator = new Configurator;

    if (\function_exists('\Sentry\init')) {
        \Sentry\init(
            [
                'dsn' => 'https://....',
                'attach_stacktrace' => true,
            ]
        );
    }

    // register here:
    SentryLogger::register();
}

The tool automatically loads the original Tracy Logger and registers logging to Sentry. Logging takes place to the Sentry and at the same time to the original log, which does not interrupt the integrity of the data.

If the log write to the Sentry fails, the exception is written to the original Logger.

📄 License

baraja-core/tracy-sentry-bridge is licensed under the MIT license. See the LICENSE file for more details.