Monolog Handler that uses Datadog
Implemented for TCP Submission to Datadog API using datadog/php-datadogstatsd
composer require nohponex/monolog-datadog-handler
<?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
)
);
nohponex/monolog-datadog-handler is licensed under the MIT License - see the LICENSE file for details