mpluskassa/laravel-datadog
Composer 安装命令:
composer require mpluskassa/laravel-datadog
包简介
A Laravel logging driver for Datadog HTTP log intake.
README 文档
README
A small Laravel logging driver for Datadog HTTP log intake.
Installation
composer require mpluskassa/laravel-datadog
Configuration
Add a Datadog channel to config/logging.php:
'datadog' => [ 'driver' => 'datadog', 'level' => env('LOG_LEVEL', 'debug'), ],
Enable it through your stack:
LOG_CHANNEL=stack LOG_STACK=single,datadog DATADOG_API_KEY=your-api-key
By default, the package sends logs to the EU intake endpoint and uses APP_NAME as the Datadog service name.
Optional env values:
DATADOG_HOST=https://http-intake.logs.datadoghq.eu DATADOG_SERVICE="${APP_NAME}" DATADOG_ENV="${APP_ENV}" DATADOG_TIMEOUT=2 DATADOG_CONNECT_TIMEOUT=1 DATADOG_THROW=false
Published Config
php artisan vendor:publish --tag=datadog-config
Behavior
- Sends logs to
{DATADOG_HOST}/api/v2/logs. - Adds the
DD-API-KEYheader. - Skips delivery when
DATADOG_API_KEYis empty. - Does not throw by default when Datadog is unavailable.
- Set
DATADOG_THROW=trueto throw delivery errors.
Example
Log::error('Something failed', [ 'order_id' => 123, ]);
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-29