Drupal is a registered trademark of Dries Buytaert
drupal 10.6.12 Update released for Drupal core (10.6.12)! drupal 11.3.13 Update released for Drupal core (11.3.13)! drupal 10.6.11 Update released for Drupal core (10.6.11)! drupal 11.3.12 Update released for Drupal core (11.3.12)! drupal 11.2.14 Update released for Drupal core (11.2.14)! drupal 10.5.12 Update released for Drupal core (10.5.12)! cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)!

Uses a Monolog handler to send logs to Datadog without a Datadog agent. Also, there's a processor that maps the log levels from Drupal to Datadogs log status. The code is based on https://github.com/guspio/monolog-datadog and https://github.com/nohponex/monolog-datadog-handler/blob/master/src/Data....

Usage

HINT:
For Version 3.0 (monolog 3.0 compatible) please use the provided Readme to it up.

Old instructions for 1.0.x branch
------------------------------------------------------------

Deployment order!

  1. Enable the module in a separate commit and deploy it
  2. Add the new logging service to your logging.services.yml and deploy that after the step above

If you don't stick to the order above you'll get an error while building the container like

In ContainerBuilder.php line 1140:                                                                                  
                                                                                                                      
    Class "Drupal\monolog_datadog\Monolog\Handler\DatadogHandler" does not exist

Add logging handler

docroot/sites/default/logging.services.yml

parameters:
  monolog.channel_handlers:
    default: ['datadog']
    php: ['error_log', 'datadog']
services:
  monolog.handler.datadog:
    class: Drupal\monolog_datadog\Monolog\Handler\DatadogHandler
    arguments: [ 'EU','@config.factory']

Check DATADOG_LOG_HOSTS in DatadogHandler for available regions. In this example we use europe (EU).

Add API key and optional Datadog tags

Set the API key in your settings.php like

$config['monolog_datadog.settings']['api_key'] = 'yourSuperSecureAPIKey';

Set tags like env or custom tags like project also in your settings.php

$config['monolog_datadog.settings']['ddtags'] = 'env:production,project:liip.ch';

Test the handler

Command to test the logging service

drush monolog_datadog:test-logging-services

Activity

Total releases
1
First release
Jun 2026
Latest release
15 hours ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
3.0.1 Stable Jun 23, 2026