Sentry Extra

Profile your MODX site with Sentry

Creator: Mat Dave Jones (matdave)

Need help installing this extra?

About Sentry Extra

This is a MODX Extra that provides a Sentry integration for MODX Revolution.

Information

Released
February 24, 2023

Supported Database
MySQL

License
MIT

Supported Versions
2.0 - Current

Downloads
9

Documentation
Sentry Extra Documentation

Instructions

Installation
  • Install the extra via the MODX Package Manager
  • Create a new project in Sentry
  • Copy the DSN from the project settings
  • Go to the System Settings and set the sentry.dsn setting to the DSN you copied in step 3
  • Go to the System Settings and set the sentry.environment setting to the environment you want to use (e.g. production)
  • Usage

    The extra will automatically log all errors to Sentry. You can also log messages manually:

    MODX 2.x $sentry = $modx->getService('sentry', 'Sentry', $modx->getOption('sentry.core_path', null, $modx->getOption('core_path') . 'components/sentry/') . 'model/sentry/'); $sentry->log(xPDO::LOG_LEVEL_ERROR, 'This is a test error message'); MODX 3.x $sentry = $modx->services->get('sentryextra'); $sentry->log(xPDO::LOG_LEVEL_ERROR, 'This is a test error message'); Additional System Settings
    • sentry.traces_sample_rate (default: 0.1) - The percentage of errors that should be sent to Sentry. This is useful for testing the integration without spamming Sentry with errors (So, for example, if you set traces_sample_rate to 0.2, approximately 20% of your transactions will get recorded and sent.).
    • sentry.keep_error_log (default: 1) - If set to 1, the PHP Errors will not be cleared after sending the errors to Sentry. This has no effect on events that call $modx->log() directly.

    New in 1.0.0-pl

    initial release

    Current releases

    1.0.0-pl
    View | Download
    February 24, 2023
    2.0 - Current