Componette

Componette

baraja-core

baraja-core / tracy-sentry-bridge v1.0.1

Easy connection between Tracy and Sentry.

download-cloud-line composer require baraja-core/tracy-sentry-bridge

Tracy and Sentry bridge

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.

price-tag-2-line

Badges

guide-fill

Dependencies

php (^8.0)
Componette Componette felix@nette.org