turbine-kreuzberg/spryker-sentry
Composer 安装命令:
composer require turbine-kreuzberg/spryker-sentry
包简介
Enable Sentry.io in your Spryker Shop easily with this Package/SDK
README 文档
README
About the package
This package enables Sentry.io to work with your Spryker shop by extending the Monitoring Module of Spryker and adding other hooks to here and there to enhance the data in Sentry.
Features
- Integration of Sentry.io with the Spryker Monitoring Module
- Possibility to ignore certain Exceptions with a configuration key
Installation
Composer
To get the latest version, simply require the package using Composer:
composer require turbine-kreuzberg/spryker-sentry
Configuration
Add the TurbineKreuzberg namespace to the PROJECT_NAMESPACES in your config/Shared/config_default.php file and configure the Sentry DSN:
$config[KernelConstants::PROJECT_NAMESPACES] = [ 'TurbineKreuzberg', // ... ]; $config[\TurbineKreuzberg\Shared\Sentry\SentryConstants::DSN] = '<your sentry DSN>';
Add the SentryMonitoringExtensionPlugin to Pyz\Service\Monitoring\MonitoringDependencyProvider:
<?php namespace Pyz\Service\Monitoring; use Spryker\Service\Monitoring\MonitoringDependencyProvider as SprykerMonitoringDependencyProvider; use TurbineKreuzberg\Service\Sentry\Plugin\Monitoring\SentryMonitoringExtensionPlugin; class MonitoringDependencyProvider extends SprykerMonitoringDependencyProvider { protected function getMonitoringExtensions(): array { return [ // ... new SentryMonitoringExtensionPlugin(), // ... ]; } }
Additional Configurations
You can adjust some configurations on the sentry module by adding some of this lines to your config file (ex. config_default.php):
// You can ignore certain exceptions by adding them to this array $config[SentryConstants::IGNORED_EXCEPTIONS] = [ ErrorException::class, // Example ]; // You can set your application version so that it gets reported to sentry $config[SentryConstants::APPLICATION_VERSION] = '1.0.0'; // You can even get it from an env variable $config[SentryConstants::APPLICATION_VERSION] = getenv('MY_APP_VERSION'); // You can set the percentage of your requests that are going to be traced for // performance monitoring, value goes from 0 to 1, being 0.2 = 20% $config[SentryConstants::TRACE_SAMPLE_RATE] = 0.4; // You can define custom serializers for complex objects like transfer objects // This will greatly enrich Sentry issues, making it possible to inspect object internal states across the backtrace // Note that you can use instances of classes that implement the __invoke method instead of a closure $config[SentryConstants::CLASS_SERIALIZERS] = [ Spryker\Shared\Kernel\Transfer\AbstractTransfer => function(Spryker\Shared\Kernel\Transfer\AbstractTransfer $data) { return $data->toArray(); } ];
turbine-kreuzberg/spryker-sentry 适用场景与选型建议
turbine-kreuzberg/spryker-sentry 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 48.67k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 11 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 turbine-kreuzberg/spryker-sentry 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 turbine-kreuzberg/spryker-sentry 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 48.67k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-11-25