Installation - Drupal

2 min read Updated: 11.09.2026

Before you start, create a project in the DockRay panel. Its settings hold the project token - the public identifier that goes into the ingest URL - and the API keys tab is where you generate a private key. The key is shown once, when it is generated: DockRay stores only its hash. If you do not have a project yet, start with Getting Started.

Requirements

  • Drupal 10.2 or newer, or Drupal 11,
  • PHP 8.2 or newer,
  • outbound HTTPS connections allowed from the server.

Installation

bash
composer require drupal/dockray
drush en dock_ray

The module's machine name is dock_ray - that is how it appears in Drush, in the settings.php keys, in the dock_ray.hub service name and in the /dock-ray/* routes.

You can also enable it from the UI: Extend (/admin/modules) → tick DockRayInstall.

Credentials in settings.php

The private key is a secret, and exported Drupal configuration usually lands in a repository - so keep the credentials in settings.php rather than in the module configuration:

php
$settings['dock_ray'] = [
  'token' => 'project-token',
  'private_key' => 'project-private-key',
  'url' => 'https://dockray.io',
];

The same array covers every environment: each has its own settings.local.php or its own settings file, so production and staging report into separate projects without the exported configuration drifting apart.

The first test

  1. Go to Configuration → Development → DockRay (/admin/config/development/dock-ray).
  2. Check the status area: it should show a complete set of credentials.
  3. Click Send a test event.

Enabling the module without credentials is safe - with no token and no key not a single request goes out.

After the install

Move on to configuration: that is where you set the minimum log level turned into events, the transaction sample rate and - optionally - collecting JavaScript errors from non-admin pages.

Next Configuration - Drupal
Chat with us The chat is closed right now Available: Mo–Fr 08:00–18:00