piotrpress/sentry-async

This plugin allows you to send Sentry events asynchronously by writing them to a log file, which is then processed by a wp-cron job.

v0.1.0 2025-07-21 13:03 UTC

This package is auto-updated.

Last update: 2025-07-21 13:06:46 UTC


README

This plugin allows you to send Sentry events asynchronously by writing them to a log file, which is then processed by a wp-cron job.

Installation

  1. Install and activate WordPress Sentry plugin.
  2. Upload and activate WordPress Sentry Async plugin files to the wp-content/plugins/wp-sentry-async directory.
  3. Add the following lines to your wp-config.php file, after the ABSPATH definition and before the wp-settings.php inclusion:
require_once ABSPATH . 'wp-content/plugins/wp-sentry-async/res/transport.php';
require_once ABSPATH . 'wp-content/plugins/wp-sentry-integration/wp-sentry.php';

Customization

To specify the path for the Sentry log file (default: wp-content/sentry.log), add the following line to your wp-config.php file before including the transport.php file:

define( 'WP_SENTRY_LOG_FILE', '/path/to/your/sentry.log' );

NOTE: Replace /path/to/your/sentry.log with the actual path where you want to store the log file.

Rotation

To enable log rotation, you can define the log file path with a date suffix. This will create a new log file for each day, allowing you to manage logs more easily. Add the following line to your wp-config.php file:

define( 'WP_SENTRY_LOG_FILE', ABSPATH . 'wp-content/logs/' . date( 'Y-m-d' ) . '.log' );

Requirements

Ensure that the web server has write permissions to log file and the file with the same name but with a .pos extension.

PHP >= 8.2 version.

License

GPL v3 or later