irabbi360/laravel-debugmate
Composer 安装命令:
composer require irabbi360/laravel-debugmate
包简介
Error tracking, log viewing, and performance monitoring SDK for Laravel
README 文档
README
A comprehensive error tracking, log viewing, and performance monitoring package for Laravel applications.
Features
- 🚨 Error Tracking: Automatically capture and report PHP errors and exceptions
- 📊 Performance Monitoring: Track application performance metrics
- 📝 Log Viewer: Stream and view application logs in real-time
- 🔐 API Token Authentication: Secure token-based communication
- 🎯 Selective Tracking: Filter which errors and logs to track
- ⚡ Async Reporting: Non-blocking error reporting via queues
- 🏷️ Tagging: Tag errors with custom data for better organization
Installation
composer require irabbi360/laravel-debugmate
Quick Start
1. Register Exception Handler
// bootstrap/app.php ->withExceptions(function (Exceptions $exceptions) { \Irabbi360\LaravelDebugMate\Services\ExceptionHandler::handles($exceptions); })->create();
To manually report an error:
use DebugMate\SDK\Facades\DebugMate; try { // Your code } catch (Exception $e) { DebugMate::reportError($e, [ 'user_id' => auth()->id(), 'route' => request()->path(), 'custom_data' => 'any value' ]); }
Performance Monitoring
Track specific operations:
use DebugMate\SDK\Facades\DebugMate; DebugMate::startMonitoring('database_query'); // ... your code ... DebugMate::stopMonitoring('database_query', ['query' => 'SELECT...']);
Log Viewer API
Stream logs to the DebugMate app:
use DebugMate\SDK\Facades\DebugMate; // Automatic - logs are streamed in real-time // Or manually push logs DebugMate::log('Channel', 'Log message', 'info', ['context_data']);
API Endpoints
Report Error
POST /api/debugmate/errors
Authorization: Bearer {API_TOKEN}
{
"project_key": "string",
"error_type": "string",
"message": "string",
"stack_trace": "string",
"context": object,
"tags": object,
"timestamp": "ISO 8601"
}
Stream Performance Metrics
POST /api/debugmate/metrics
Authorization: Bearer {API_TOKEN}
{
"project_key": "string",
"metric_name": "string",
"duration_ms": number,
"context": object,
"timestamp": "ISO 8601"
}
Stream Logs
POST /api/debugmate/logs
Authorization: Bearer {API_TOKEN}
{
"project_key": "string",
"channel": "string",
"message": "string",
"level": "string",
"context": object,
"timestamp": "ISO 8601"
}
Configuration
Edit config/debugmate.php:
return [ 'enabled' => env('DEBUGMATE_ENABLED', true), 'api_url' => env('DEBUGMATE_API_URL'), 'api_token' => env('DEBUGMATE_API_TOKEN'), 'project_key' => env('DEBUGMATE_PROJECT_KEY'), // What to track 'track_errors' => true, 'track_logs' => true, 'track_performance' => true, 'track_queries' => false, // Queue configuration 'queue' => env('QUEUE_CONNECTION', 'sync'), 'async_reporting' => true, // Filtering 'ignore_paths' => ['health', 'ping'], 'ignore_exceptions' => [], 'sample_rate' => 1.0, // 0-1, percentage of requests to track ];
Documentation
See full documentation in /docs folder or visit debugmate.app/docs
License
MIT
irabbi360/laravel-debugmate 适用场景与选型建议
irabbi360/laravel-debugmate 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 irabbi360/laravel-debugmate 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 irabbi360/laravel-debugmate 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 33
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-07