justbetter/laravel-sentry-filter-events 问题修复 & 功能扩展

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

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

justbetter/laravel-sentry-filter-events

Composer 安装命令:

composer require justbetter/laravel-sentry-filter-events

包简介

Lets you filter certain events in Sentry using a filter list

README 文档

README

A small package that lets you filter Sentry events with an ignore list. Can also use externally hosted JSON files as lists.

Installation

composer require justbetter/laravel-sentry-filter-events

Configuration

You will have to enable the before_send handler in your config/sentry.php:

'before_send' => [\JustBetter\LaravelSentryFilterEvents\Filters\SentryFilter::class, 'beforeSend'],

You can then configure your config/sentry-filter.php, for example:

// List of errors to ignore
'ignore_errors' => [
    ['message' => 'Unnecessary error'],
    ['exception' => \App\UnnecessaryError::class],
],

You can ignore either messages that contain certain strings, or whole Exception classes.

Global filtering

You can also use an external JSON file to filter errors globally. This has the same format as the list of ignore_errors (but then in JSON). Note that Exception class names need to be complete. For example:

{
    {"message": "Unnecessary error"},
    {"exception": "\\App\\UnnecessaryError"},
},

For simplicity, the config uses the SENTRY_FILTER_LIST_LARAVEL env variable by default to define the filter list url. This means that if you only want to use an external filter list, you don't need to publish the config file.

Scopes

This package contains the ability to use multiple scopes (defined in the config file). This allows you to filter different errors in different situations.

For example, if you have Sentry enabled on your frontend, you don't want to use the same filter list as you would for your backend errors. In that case, you could create a new scope in the config for your frontend errors and retrieve the list like so:

$filterList = resolve(\JustBetter\LaravelSentryFilterEvents\Actions\GetFilterList::class)->get('frontend');

Take a look at how src/filters/SentryFilter.php works for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固