baraja-core / tracy-sentry-bridge
The package provides an easy connection between Tracy and Sentry.
Installs: 24 833
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- sentry/sdk: ^3.1
- tracy/tracy: ^2.8 || 3.0-dev
Requires (Dev)
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^1.0
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-nette: ^1.0
- phpstan/phpstan-strict-rules: ^1.0
- roave/security-advisories: dev-master
- spaze/phpstan-disallowed-calls: ^2.0
This package is auto-updated.
Last update: 2024-12-08 18:27:18 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.