Installation - Drupal

2 min read Updated: 11.09.2026

On this page Requirements
  1. Requirements
  2. Installation
  3. Credentials in settings.php
  4. The first test
  5. After the install

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 DockRay → Install.

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.

Keep reading

DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.