morcen/probe
Composer 安装命令:
composer require morcen/probe
包简介
A next-generation debugging and observability package for Laravel
README 文档
README
A debugging and observability package for Laravel applications. Probe records requests, exceptions, queries, jobs, cache operations, and scheduled tasks — then surfaces them in a real-time dashboard.
Dashboard screenshot — coming soon
Requirements
- PHP 8.2+
- Laravel 10, 11, or 12
Installation
composer require morcen/probe
Run the install command to publish the config and migrate:
php artisan probe:install
Or publish assets manually:
php artisan vendor:publish --tag=probe-config php artisan vendor:publish --tag=probe-migrations php artisan migrate
Dashboard Access
Visit /probe in your browser. By default, access is restricted to local environments. To customize authorization, add the following to your AppServiceProvider:
use Morcen\Probe\Probe; Probe::auth(function ($request) { return $request->user()?->isAdmin(); });
You can change the dashboard path via the PROBE_PATH env variable or the config file.
Watchers
Probe ships with six watchers. Toggle them in config/probe.php or via environment variables:
| Watcher | Env Variable | Default |
|---|---|---|
| Requests | PROBE_WATCHER_REQUESTS |
true |
| Exceptions | PROBE_WATCHER_EXCEPTIONS |
true |
| Jobs | PROBE_WATCHER_JOBS |
true |
| Queries | PROBE_WATCHER_QUERIES |
true |
| Cache | PROBE_WATCHER_CACHE |
false |
| Schedule | PROBE_WATCHER_SCHEDULE |
true |
Query intelligence
The query watcher automatically tags slow queries and detects N+1 patterns:
PROBE_SLOW_QUERY_MS=100 # queries over this threshold are tagged "slow" PROBE_N1_THRESHOLD=5 # same query fingerprint N times = tagged "n1"
Alerts
Probe fires notifications when entries match a rule. Configure rules in config/probe.php:
'alerts' => [ ['types' => ['exceptions'], 'channel' => 'slack', 'url' => env('PROBE_SLACK_WEBHOOK')], ['types' => ['jobs'], 'tags' => ['failed'], 'channel' => 'webhook', 'url' => env('PROBE_WEBHOOK_URL')], ['types' => ['queries'], 'tags' => ['slow'], 'channel' => 'log'], ],
Supported channels: slack, webhook, log.
Pruning
Schedule the prune command to keep your database clean:
// routes/console.php Schedule::command('probe:prune')->daily();
Pruning TTLs are configurable per entry type:
PROBE_PRUNE_REQUESTS=7 PROBE_PRUNE_EXCEPTIONS=30 PROBE_PRUNE_JOBS=7 PROBE_PRUNE_QUERIES=3 PROBE_PRUNE_CACHE=1 PROBE_PRUNE_SCHEDULE=7
To clear all entries immediately:
php artisan probe:clear
Sampling
For high-traffic production environments, record a fraction of entries:
PROBE_SAMPLING_RATE=0.1 # record 10% of entries
Laravel Octane
Probe supports Laravel Octane. Per-request state resets automatically between requests.
Configuration Reference
Publish and review config/probe.php for all options. Key environment variables:
| Variable | Default | Description |
|---|---|---|
PROBE_ENABLED |
true |
Enable or disable Probe entirely |
PROBE_PATH |
probe |
Dashboard URI path |
PROBE_STORAGE_DRIVER |
database |
Storage backend |
PROBE_SAMPLING_RATE |
1.0 |
Fraction of entries to record |
Contributing
Contributions are welcome. Please follow these steps:
- Fork the repository.
- Create a branch:
git checkout -b feature/your-feature. - Write tests for your changes.
- Run the test suite:
./vendor/bin/pest. - Open a pull request against
main.
Please keep pull requests focused. One feature or fix per PR. Open an issue first for large changes so we can align on direction before you invest time writing code.
Running Tests
composer install ./vendor/bin/pest
License
Probe is open-sourced software licensed under the MIT license.
morcen/probe 适用场景与选型建议
morcen/probe 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 morcen/probe 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 morcen/probe 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 34
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-17