penobit/crash-reporter
Composer 安装命令:
composer require penobit/crash-reporter
包简介
Penobit's Crash Reporter will notify crash reports via email and HTTP requests to your api.
README 文档
README
Laravel crash reporter library will notify you about any uncaught exceptions in your laravel application by Sending you an email or making a POST/GET HTTP request to an endpoint
Installation
You can install Laravel Crash Reporter package simply using the Composer Just execute following command:
php composer require penobit/crash-reporter
after compoer downloaded and installed the package you should publish it's config file, To do that run following cmd
php artisan vendor:publish --tag config
This cmd will publish a new file crash-reporter.php to your app/config directory
Configuration
Laravel crash reporter is completely configurable.
it's configurable using .env file or directly from crash-reporter.php file.
The .env file is our recommended way yo configure the crash reporter
| Configuration | Environment File .env |
Config file crash-reporter.php |
Default Value |
|---|---|---|---|
| Is Crash Reporter Enabled | CRASH_REPORTER_ENABLED | enabled |
false |
| Send Exceptions Over Email Channel | CRASH_REPORTER_EMAIL_CHANNEL | channels.email |
true |
| Crash Sender EMail Address | CRASH_REPORTER_FROM_EMAIL | email.from.address |
MAIL_FROM_ADDRESS in .env |
| Crash Sender Email's Sender Name | CRASH_REPORTER_FROM_NAME | email.from.address |
MAIL_FROM_NAME in .env if available "Laravel Crash Reporter" otherwise |
Send crash reports toSupports multiple addresses seperated by ; |
CRASH_REPORTER_EMAIL_ADDRESS | email.to |
null |
| Send Exceptions Over HTTP Channel | CRASH_REPORTER_HTTP_CHANNEL | channels.http |
false |
| Http request method | CRASH_REPORTER_HTTP_METHOD | http.method |
"POST" |
| Send HTTP request to | CRASH_REPORTER_HTTP_ENDPOINT | http.endpoint |
null |
| HTTP Request Token *1 | CRASH_REPORTER_HTTP_TOKEN | http.token |
null |
*1 Please Note! The token will be sent in two different ways based on HTTP request method:
- GET: the token will be added to the url's query string like:
api.penobit.com/report/crash?token=MY_TOKEN_FROM_ENV_FILE - POST: the token will be sent as an authorization bearer header:
Authorization: Bearer MY_TOKEN_FROM_ENV_FILE
Customizations
You can customize the email template by creating a new template in your views directory.
just create your custom email template template in this path:
/resources/views/vendor/penobit/crash-reporter/crash-reporter-mail.blade.php
and the crash reporter uses that instead of the default email template.
You can also use these $data variable that is an object containing the exceptions details:
$data->message: Exception message$data->file: File where exception was thrown$data->line: Line where exception was thrown$data->trace: Exception trace$data->url: URL where exception was thrown$data->body: Request body$data->ip: IP address of the user$data->method: Request method$data->userAgent: Users's User agent$data->browser: User's browser name$data->browser_logo: User's browser logo base64 encoded URI$data->os: User's OS name$data->os_logo: User's OS logo base64 encoded URI
penobit/crash-reporter 适用场景与选型建议
penobit/crash-reporter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 40 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 07 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「email」 「report」 「crash」 「reporter」 「crash-reporter」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 penobit/crash-reporter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 penobit/crash-reporter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 penobit/crash-reporter 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Reportico Open Source PHP Report Designer
A PSR-7 compatible library for making CRUD API endpoints
Allow KoolReport to use twig template engine to render view
Extensible library for building notifications and sending them via different delivery channels.
Email+ extends Kirby's email capabilities by adding support for multiple email services using the same Kirby email API.
Pure PHP library to read JRXML files made with 'JasperSoft Studio' and generate reports in PDF
统计信息
- 总下载量: 40
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-07-23