amaristany/yii2-sentry 问题修复 & 功能扩展

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

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

amaristany/yii2-sentry

最新稳定版本:v1.0.4

Composer 安装命令:

composer require amaristany/yii2-sentry

包简介

Yii2 Sentry integration as an extension (component + log target).

README 文档

README

A Yii2 extension that integrates Sentry error tracking and logging into your Yii2 application.

Description

This extension provides seamless integration of Sentry SDK with Yii2, allowing you to capture and report errors, exceptions, and performance data to Sentry. It includes a component for initialization and a custom queue transport for handling events asynchronously.

Installation

Install the extension via Composer:

composer require amaristany/yii2-sentry

Configuration

Configure the Sentry component in your application config:

// config/main.php
return [
    // ...
    'components' => [
        'sentry' => [
            'class' => 'Amaristany\Sentry\SentryComponent',
            'dsn' => 'https://your-dsn@sentry.io/project-id',
            'queueId' => 'queue', // optional, defaults to 'queue'
        ],
    ],
];

Usage

Once configured, the extension will automatically capture errors and exceptions in your Yii2 application. You can also manually capture events:

use Sentry;

Sentry\captureException(new Exception('Something went wrong'));
Sentry\captureMessage('Something happened');

For more advanced usage, refer to the Sentry PHP SDK documentation.

Requirements

  • PHP >= 8.1.0
  • Yii2 ~2.0.0
  • Sentry SDK ^4.0
  • Guzzle HTTP ^7.0

License

This extension is licensed under the MIT License. See the LICENSE file for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-08