nohponex / monolog-datadog-handler

Monolog Handler that uses DataDog
MIT License
6 stars 1 forks source link
datadog monolog monolog-handler php psr-3

monolog-datadog-handler

Monolog Handler that uses Datadog

Implemented for TCP Submission to Datadog API using datadog/php-datadogstatsd

Installation

composer require nohponex/monolog-datadog-handler

Basic Usage

<?php

use Nohponex\MonologDataDogHandler\DataDogHandler;

$tag = [
    sprintf(
        'environment:%s',
        'ci'
    ),
    sprintf(
        'instance:%s',
        'api'
    )
];

$log = new Logger('name');
$log->pushHandler(
    new DataDogHandler(
        'xxxx',
        'yyy',
        $tag,
        \Monolog\Logger::INFO
    )
);

License

nohponex/monolog-datadog-handler is licensed under the MIT License - see the LICENSE file for details