Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Role Theme Switcher Module role_theme_switcher crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

This module sends Drupal logs directly to Datadog without requiring a local Datadog agent. It also maps Drupal's log levels to Datadog's status system for improved clarity.

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

Tracked releases
1
Tracked since
Jun 2026
Latest release
2 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
3.0.1 Stable Jun 23, 2026