承接 wieni/wmsentry 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

wieni/wmsentry

Composer 安装命令:

composer require wieni/wmsentry

包简介

A module for sending errors to Sentry in Drupal 9.

README 文档

README

Latest Stable Version Total Downloads License

A module for sending errors to Sentry in Drupal 9.

Why?

  • We use Sentry to monitor our sites and to track errors
  • We couldn't find an existing (stable) module for integrating Sentry with Drupal, using v2 of the Sentry SDK.

Installation

This module requires PHP 8.0 or higher and uses the Sentry PHP package (sentry/sentry), which is not tied to any specific library that sends HTTP messages. Instead, it uses Httplug to let users choose whichever PSR-7 implementation and HTTP client they want to use.

If you just want to get started quickly you should run the following command:

composer require wieni/wmsentry nyholm/psr7 php-http/guzzle6-adapter

For more information, please refer to the Install section of the sentry/sentry-php repository README.

How does it work?

Configuration

Once enabled, you can configure the module through the settings form at /admin/config/development/logging/sentry.

To change the configuration of the module, users need the permission administer wmsentry settings.

To dynamically set the environment, release or other config values, you can override the config in settings.php:

$config['wmsentry.settings'] = [
    'dsn' => $_ENV['SENTRY_DSN'],
    'environment' => $_SERVER['APP_ENV'],
];

Events

Drupal\wmsentry\WmsentryEvents::BEFORE_BREADCRUMB

This function is called before the breadcrumb is added to the scope. When nothing is returned from the function the breadcrumb is dropped. The callback typically gets a second argument (called a “hint”) which contains the original object that the breadcrumb was created from to further customize what the breadcrumb should look like.

Drupal\wmsentry\WmsentryEvents::BEFORE_SEND

This function can return a modified event object or nothing to skip reporting the event. This can be used for instance for manual PII stripping before sending.

Drupal\wmsentry\WmsentryEvents::SCOPE_ALTER

This function is called before the scope is added to the captured event. The scope holds data that should implicitly be sent with Sentry events. It can hold context data, extra parameters, level overrides, fingerprints etc.

Drupal\wmsentry\WmsentryEvents::OPTIONS_ALTER

This function is called before the client is created with an options object. The options object is a configuration container for the Sentry client.

Setting the release ID through an HTTP endpoint

This module provides an HTTP endpoint that can be used to set the Sentry release ID without being logged in. This can be useful when creating a new Sentry release through the API, eg. in a CI pipeline.

The endpoint is /sentry/set-release and is secured in the same way as the core/rebuild.php script (see documentation). The release ID can be passed using the release query parameter. Here's an example call:

/sentry/set-release?release=exampleproject@62d50f53&timestamp=1614934032&token=XXE6H4wwVC6x5I6QnTPFTj-hSksNfgUpndv9X-3lC7Y

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

Security

If you discover any security-related issues, please email security@wieni.be instead of using the issue tracker.

License

Distributed under the MIT License. See the LICENSE file for more information.

wieni/wmsentry 适用场景与选型建议

wieni/wmsentry 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 33.16k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 02 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 wieni/wmsentry 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 wieni/wmsentry 我们能提供哪些服务?
定制开发 / 二次开发

基于 wieni/wmsentry 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-02-12