bohacpetr/nette-sentry-legacy
Composer 安装命令:
composer require bohacpetr/nette-sentry-legacy
包简介
Legacy Nette Sentry logger library
关键字:
README 文档
README
This is fork of rootpd/nette-sentry link supporting legacy Nette 2.2, Sentry 1.11 and PHP 7.0+. Just in case you end up maintaining technical debt.
Tracy logger extension capable of logging messages and errors to Sentry.
Note: If you have debug mode enabled in your application, logger will only send \Tracy\Debugger::log() messages to sentry. Any exception ending with Tracy's blue screen is not going to be logged as you can see the exception details directly.
Installation
Install package via Composer:
composer require bohacpetr/nette-sentry-legacy
Configuration
Enable and configure the extension in Nette config file:
extensions: # ... sentry: Rootpd\NetteSentry\DI\SentryExtension sentry: dsn: https://123abc123abc123abc123abc123abc12@sentry.io/3 # required environment: production # optional, defaults to "local" user_fields: # optional, defaults to empty array; Nette's identity ID is being sent automatically - email session_sections: # optional, list of session sections to track - mySection priority_mapping: mypriority: warning
Priority-Severity mapping
Sometimes you might need to use custom priority when logging the error in Nette:
\Tracy\Debugger::log('foo', 'mypriority');
Sentry only allows strict set of severities. By default any message with unknown (non-standard) severity is not being logged.
You can map your custom priority to Sentry's severity in config by using priority_mapping as shown in the example.
The allowed set of Sentry severities can be checked in Sentry's PHP repository.
Usage
Once enabled as extension, you can continue to throw exceptions without any change. To log message please use \Tracy\Debugger::log() method.
bohacpetr/nette-sentry-legacy 适用场景与选型建议
bohacpetr/nette-sentry-legacy 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 03 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「errors」 「nette」 「sentry」 「errorlogger」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bohacpetr/nette-sentry-legacy 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bohacpetr/nette-sentry-legacy 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bohacpetr/nette-sentry-legacy 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Fork of a PHP client for Sentry (http://getsentry.com) that work also with php5.2
An implementation of the Sentry User Manager for Laravel.
Simple Yii2 Sentry target for logging (http://getsentry.com)
Bootstraps errors and handles them via reporters and renderers
Monitoring for scheduled jobs
Asynchronous Sentry for Symfony - Fire and forget
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-18