Download the PHP package silverstripe/raygun without Composer
On this page you can find all versions of the php package silverstripe/raygun. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download silverstripe/raygun
More information about silverstripe/raygun
Files in silverstripe/raygun
Package raygun
Short Description Raygun integration for SilverStripe
License BSD-3-Clause
Homepage https://github.com/silverstripe/silverstripe-raygun
Informations about the package raygun
Raygun integration for Silverstripe
This is a simple module that binds Raygun to the error & exception handler of Silverstripe.
Requirements
- PHP ^8.1
- Raygun4PHP ^2
- Silverstripe Framework ^5
Support for Silverstripe 3 can be found in version ^1
. Support for Silverstripe 4 can be found in versions ^2
and
^3
.
Installation
Configuration
Add the following to your .env
file:
If you want to track JavaScript errors in CMS, you can activate LeftAndMainExtension
in your project YAML configs:
Set Log Level
You can define the error reporting level in your YAML config:
User tracking
By default, no user data will be sent to Raygun at all. You can choose to track logged-in members by setting some yml configuration:
Multiple Raygun API Keys (app keys)
You may have more than one Raygun integration, each of which could use custom API keys, different
from the default one (set by SS_RAYGUN_APP_KEY
). To do so you'll need to configure each one of them separately. Here are some examples:
Disable handler
The RaygunHandler is enabled by default when the SS_RAYGUN_APP_KEY
environment variable is set. There may be some situations where you need that variable to be set but you don't want the handler enabled by default (e.g. you may not want the handler enabled in dev or test environments except when triggering some test exception via a BuildTask
).
Then in your BuildTask
you can enable that handler as required.
Proxy
If you need to forward outgoing requests through a proxy (such as for sites hosted in CWP), you can set the proxy host and optional port via yaml config:
Filtering
Raygun will send the following data:
- $_POST
- $_SERVER
- $_GET (included in URL also)
By default we filter out some sensitive Silverstripe details which appear in the $_SERVER variable. These include:
- SS_DATABASE_USERNAME
- SS_DEFAULT_ADMIN_USERNAME
- SS_RAYGUN_APP_KEY
- Cookie information (through
Cookie
andHTTP_COOKIE
) - Basic auth information (through
PHP_AUTH_PW
) - HTTP authorisation information (through
Authorization
andHTTP_AUTHORIZATION
) - Anything containing
PASSWORD
,KEY
,SECRET
orTOKEN
(case insensitive)
You will likely want to filter out other sensitive data such as credit cards, passwords etc. You can do this in your mysite/_config.php
file. These rules are applied to $_SERVER, $_POST and $_GET data. All key comparisons are case insensitive.
Example implementation in mysite/_config.php:
More information about accepted filtering formats is available in the Raygun4php documentation.