This project is not covered by Drupal’s security advisory policy.
DockRay connects Drupal with the DockRay application monitoring platform.
It automatically reports Drupal errors and exceptions and can monitor HTTP request performance,
helping developers detect and diagnose problems in production.
Reported events can include stack traces, severity, environment and release information,
as well as request context. Errors can then be reviewed and analyzed in the
DockRay monitoring panel.
The module supports Drupal 10.2 and Drupal 11.
Features
- Automatic reporting of Drupal errors and exceptions
- Stack traces and diagnostic context for exceptions
- Configurable minimum error severity
- Optional HTTP transaction and performance monitoring
- Optional JavaScript error monitoring
- Manual exception reporting from custom Drupal code
- Configuration through the administration panel or
settings.php - Test events and live connection status
- Background event delivery after the response is sent to the visitor
Installation
Install the module using Composer and enable it with Drush:
composer require drupal/dockray drush en dock_ray
Then open:
Administration → Configuration → Development → DockRay
Enter your DockRay project token and private key, save the configuration,
and use Send a test event to verify the connection.
Configuration
Credentials can be configured through the administration panel or stored
in settings.php. Keeping the private key in
settings.php is recommended when exported Drupal configuration
is stored in a repository.
$settings['dock_ray'] = [ 'token' => 'project-token', 'private_key' => 'project-private-key' ];
The module also lets you configure the minimum reported error severity,
transaction sampling and optional JavaScript error collection.
Reporting exceptions from your code
Drupal errors and uncaught exceptions are reported automatically.
You can also send exceptions caught by your own code:
try { $this->import(); } catch (\Throwable $exception) { \Drupal::service('dock_ray.hub')->captureException($exception); }
Messages logged through Drupal's logging system can also reach DockRay:
\Drupal::logger('my_module')->error('Import failed.');Performance
DockRay queues events during the request and sends them after the response
has been flushed. This means that a slow or temporarily unavailable
monitoring service does not delay the page response for visitors.
Learn more
Learn more about application monitoring with DockRay at
dockray.io.
Project information
- Project categories: Developer tools, Performance
- Created by dockcodes on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
