DO NOT USE YET, PACKAGE IN DEVELOPMENT
A lightweight packages to fetch metrics from Datadog
- Metrics doc
- ✅ Get active list
- ✅ Get metadata
- ✅ Query timeseries points
Edit metadataSearchSubmit metrics
You can install the package via composer:
composer require romainnorberg/datadog-api
use Romainnorberg\DataDogApi\DataDogApi;
// Using env (DATADOG_API_KEY & DATADOG_APPLICATION_KEY)
$datadogApi = new DataDogApi();
// Using arguments
$datadogApi = new DataDogApi('<apiKey>', '<applicationKey>');
use Romainnorberg\DataDogApi\DataDogApi;
$datadogApi = new DataDogApi(); // Using env
$metrics = $datadogApi
->metrics()
->query()
->from((new \DateTime())->sub(new \DateInterval('PT1H')))
->to(new \DateTime())
->query('avg:worker.memory.heapUsed{*}')
->handle();
composer test
Please see CHANGELOG< 74AC /a> for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email romainnorberg@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.