

DockRay requires an account and a project at https://dockray.io (a free plan
and paid service plans are available). The plugin itself is free.
DockRay sends PHP errors and uncaught exceptions from your WordPress site to a
DockRay project, together with the stack trace, the environment and — when you
allow it — the logged-in user. It can also measure how long requests take.
Features:
wp-config.php constants, per field orFill in the token and the private key on Settings DockRay and you are
done. If you would rather keep the private key out of the database — a
database dump travels between environments more often than a config file
does — define it as a wp-config.php constant instead; the settings screen
shows exactly which fields are currently coming from a constant, and a
Configuration source switch lets you pin the plugin to constants only,
to the database only, or let a defined constant win per field (the default,
and how the plugin behaved before this screen existed).
Every setting below has a field on Settings DockRay. Each one can also
be set as a wp-config.php constant — go there above the /* That's all */
line — and the Configuration source switch on the screen decides whether
a constant is allowed to win, is required, or is ignored in favour of the
database.
Server URL — which DockRay instance receives the events. Defaults to the
hosted one.
define( 'DOCK_RAY_URL', 'https://dockray.io' );
Error types — which PHP errors become events. Defaults to everything except
deprecations and notices. This one is constant-only; there is no equivalent
field on the settings screen, since it is a bitmask rather than a value worth
typing into a text box.
define( 'DOCK_RAY_ERROR_TYPES', E_ALL & ~E_DEPRECATED & ~E_NOTICE );
Personal data — attaches the user id, e-mail, IP address and user agent.
Off by default.
define( 'DOCK_RAY_SEND_DEFAULT_PII', true );
Release — the version of the site. Without it the active theme version is
used.
define( 'DOCK_RAY_VERSION', 'v1.4.0' );
Environment — defaults to WP_ENVIRONMENT_TYPE.
define( 'DOCK_RAY_ENV', 'production' );
Request timing — the share of requests that are measured, from 0 to 1.
Zero, the default, disables it.
define( 'DOCK_RAY_TRACES_SAMPLE_RATE', 0.2 );<h3>Filters</h3>
dock_ray_token, `dock_ray_private_key`, `dock_ray_url` — override the
credentials, for instance to read them from a secrets manager.
dock_ray_user_context — change the user data attached to events.
add_filter( 'dock_ray_user_context', fn( array $user ) => array_merge( $user, [ 'plan' => 'pro' ] ) );
dock_ray_scope — set tags and extra context before events are sent.
add_filter( 'dock_ray_scope', function ( $scope ) { $scope->setTag( 'tier', 'gold' ); return $scope; } );
dock_ray_options — adjust SDK options after the client is built.
dock_ray_client_builder — an action that receives the client builder before
the client is created.
if ( function_exists( 'dock_ray_safe' ) ) {
dock_ray_safe( fn( $hub ) => $hub->captureException( $exception ) );
}
The callback runs only when the plugin is configured, so the calling code does
not have to check.
This plugin sends data to DockRay (https://dockray.io), the monitoring service
it is a client for. Nothing is sent until you enter a project token and a
private key on Settings DockRay or configure those credentials through
wp-config.php constants or plugin filters: without credentials the plugin loads
and stays silent.
What is sent, and when:
The receiving instance is https://dockray.io unless you point the plugin at
your own with the Server URL setting.
Request bodies, cookies, request headers, URL query strings and fragments,
and stack frame argument values are removed before delivery. Error messages,
source code context, file paths and custom context may still contain personal
or sensitive information supplied by your application. Review what your
application logs and inform your visitors before enabling monitoring.
Browser reports also include the page and referrer URLs without query strings
or fragments. Normal reports are queued until shutdown; the manual test waits
for an acknowledgement. The service receives the IP of the sending server.
Service terms: https://dockray.io/pl/regulamin
Privacy policy: https://dockray.io/privacy-policy