shantotonni/pm-error-monitor 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

shantotonni/pm-error-monitor

最新稳定版本:v1.1.0

Composer 安装命令:

composer require shantotonni/pm-error-monitor

包简介

Auto error/exception monitoring reporter for Laravel projects

README 文档

README

Automatically captures and reports Laravel exceptions to a central Project Management dashboard.

What it does

  • Hooks into Laravel's exception handler automatically
  • Sends error details (message, file, line, stack trace, request data) to PM dashboard
  • Groups duplicate errors (no spam)
  • Auto-creates emergency tasks for critical errors
  • Notifies assigned developers

Requirements

  • PHP >= 7.4
  • Laravel 8, 9, 10, or 11

Installation

Step 1 — Add repository to composer.json

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/shantotonni/pm-error-monitor"
    }
]

Step 2 — Require the package

composer require shantotonni/pm-error-monitor

Step 3 — Run the installer

php artisan pm-monitor:install --project-id=YOUR_PROJECT_ID --token=YOUR_API_TOKEN --env=production

Get project-id and token from:

Project Management → Projects → Manage → API Keys → Error Monitor

Step 4 — Clear config and test

php artisan config:clear
php artisan pm-monitor:test

What the installer does automatically

Action File
Adds PM_MONITOR_* variables .env
Injects PmMonitorHandler::report() app/Exceptions/Handler.php
Publishes config config/pm-monitor.php

Manual .env variables (if needed)

PM_MONITOR_URL=http://YOUR-PM-SERVER/api/monitoring/errors
PM_MONITOR_PROJECT_ID=1
PM_MONITOR_TOKEN=your_token_here
PM_MONITOR_ENV=production
PM_MONITOR_ENABLED=true
PM_MONITOR_TIMEOUT=3

Manual Handler.php snippet (if auto-patch fails)

Inside app/Exceptions/Handler.phpregister() method:

public function register(): void
{
    $this->reportable(function (\Throwable $e) {
        \PmMonitor\PmMonitorHandler::report($e);
    });
}

Artisan commands

Command Description
php artisan pm-monitor:install Full auto-setup (.env + Handler.php patch)
php artisan pm-monitor:test Send test error to verify connection

Severity auto-detection

Condition Severity
DB / connection exception critical
Keywords: payment, transaction, deploy, database critical
HTTP 5xx high
HTTP 4xx low
Everything else medium

Uninstall

  1. Remove shantotonni/pm-error-monitor from composer.json
  2. Run composer update
  3. Remove PM_MONITOR_* lines from .env
  4. Remove PmMonitorHandler::report($e) from Handler.php

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固