Skip to main content
drupalreleases
Release: Cms 2.2.3 — Update released for Drupal core (2.2.3)! Release: Easy Breadcrumb 2.0.11 — Minor update available for module easy_breadcrumb (2.0.11). Release: Bootstrap 8.x-3.42 — Minor update available for theme bootstrap (8.x-3.42). Release: Editoria11y Accessibility Checker 3.0.10 — Minor update available for module editoria11y (3.0.10). Release: Editoria11y Accessibility Checker 2.2.24 — Minor update available for module editoria11y (2.2.24). Release: Leaflet 10.4.13 — Minor update available for module leaflet (10.4.13). Release: Flag 5.1.1 — Minor update available for module flag (5.1.1). Release: Layout Paragraphs 3.0.0-beta5 — New beta version released for module layout_paragraphs (3.0.0-beta5). Module Revived: Bootstrap 8.x-3.41 — Theme bootstrap updated after 6 months of inactivity (8.x-3.41). Security Coverage: Component Library — Module component_library now has official Drupal security advisory coverage.

Monolog Datadog

106 sites Security covered Drupal 10–11 PHP ^8.0

Part of the Monolog ecosystem · 6 projects

View on drupal.org

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

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
6
Tracked since
Mar 2024
Latest release
6 days ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
3.0.3 Stable 10–11 Oct 1, 2026
3.0.2 Stable 10–11 Aug 26, 2026
3.0.1 Stable 10–11 Jun 23, 2026
3.0.0 Stable 9–11 Aug 27, 2024
3.0.x-dev Dev 10–11 Aug 27, 2024
1.0.3 Stable 8–10 Mar 8, 2024