A Flarum extension. Flarum integration for Sentry.
Install with composer:
composer require fof/sentry:"*"
composer update fof/sentry:"*"
Configure the extension in the admin panel. You'll need to provide your Sentry DSN to get started.
This extension provides an extender that allows other extensions to customize Sentry configuration. You can use this to set custom release versions, add tags, and more. All settings are applied to both the PHP backend and JavaScript frontend.
In your extension's extend.php
file:
use FoF\Sentry\Extend\Sentry;
return [
// Other extenders
(new Sentry())
->setRelease('my-app-v1.2.3')
->setEnvironment('production')
->addTag('app_name', 'My Awesome App'),
];
Set a custom release version for Sentry events (applied to both backend and frontend):
(new Sentry())->setRelease('v2.0.0-beta.1');
Set a custom environment name (applied to both backend and frontend):
(new Sentry())->setEnvironment('staging');
Add a custom tag to all Sentry events (applied to both backend and frontend):
(new Sentry())
->addTag('server_type', 'dedicated')
->addTag('php_version', PHP_VERSION);
You can use environment variables to configure Sentry:
(new Sentry())
->setRelease(env('APP_VERSION', 'development'))
->setEnvironment(env('APP_ENV', 'production'))
->addTag('server_id', env('SERVER_ID', 'unknown'));
An extension by FriendsOfFlarum, commissioned by webdeveloper.com.