PHPackages                             tekintian/sentry\_php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. tekintian/sentry\_php

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

tekintian/sentry\_php
=====================

Sentry PHP 可视化日志管理系统,支持 php5.3以上版本, 支持 thinkphp5, ci, yii2, laravel等PHP框架, 可以集成到框架中,也可直接使用, sentry raven thinkphp5适配, tp5 sentry 日志管理工具, sentry sdk for php thinkphp5,

1.9(7y ago)65.4kBSD-3-ClausePHP

Since Mar 16Pushed 7y ago2 watchersCompare

[ Source](https://github.com/tekintian/sentry_php)[ Packagist](https://packagist.org/packages/tekintian/sentry_php)[ Docs](https://github.com/tekintian/sentry_php)[ RSS](/packages/tekintian-sentry-php/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Sentry PHP日志管理系统
================

[](#sentry-php日志管理系统)

Sentry PHP 可视化日志管理系统,支持 php5.3以上版本, 支持 thinkphp5, ci, yii2, laravel等PHP框架, 可以集成到框架中,也可直接使用.

PHP集成 sentry 通用方法:
------------------

[](#php集成-sentry-通用方法)

1. composer require "tekintian/sentry\_php"

```
# 2种载入方式,选择其中一种即可
# 方案 一:  采用autoload.php自动载入方式加载 Sentry
require_once  __DIR__ . 'vendor/autoload.php';

# 方案 二:  在你的入口文件中载入Sentry ,直接载入方式,
require_once  __DIR__ . '/vendor/tekintian/sentry_php/src/sentry_php/Sentry.php';
```

2. 在你的入口文件中增加

```
//$client_url 为你的sentry服务端分配的客户端URL
\tekintian\sentry_php\Sentry::listen('http://88861b9070395551b55063f03a6ca988:58891b9070394b61b55063f03a6ca123@sentry.yunnan.ws/1');
```

thinkphp5 sentry 可视化日志管理系统配置步骤
------------------------------

[](#thinkphp5-sentry-可视化日志管理系统配置步骤)

### 一. thinkphp/base.php 配置方法 (推荐此种方案)

[](#一-thinkphpbasephp-配置方法-推荐此种方案)

1. 在项目根目录执行 composer require "tekintian/sentry\_php"
2. 在 thinkphp/base.php 文件的最后增加一下代码

```
# 注意将  http://88861b9070395551b55063f03a6ca988:58891b9070394b61b55063f03a6ca123@sentry.yunnan.ws/1 换成你自己的 sentry 服务端分配的URL即可
// sentry日志监听开启;
\tekintian\sentry_php\Sentry::listen('http://88861b9070395551b55063f03a6ca988:58891b9070394b61b55063f03a6ca123@sentry.yunnan.ws/1');
```

> 提示: 在 thinkphp/base.php 文件的最后, thinkphp5已经自动加载了 Sentry类; 如果是在 index.php 入口文件最前面的话需要手动加载 Sentry 后才可执行

### 二. tp5 public/index.php 配置方法

[](#二-tp5--publicindexphp-配置方法)

```
// Sentry start
// Sentry 放到TP入口文件的最前面, 需要手动加载Sentry.php
require __DIR__ . '/../vendor/tekintian/sentry_php/src/sentry_php/Sentry.php';
// sentry日志监听开启;
\tekintian\sentry_php\Sentry::listen('http://88861b9070395551b55063f03a6ca988:58891b9070394b61b55063f03a6ca123@sentry.yunnan.ws/1');
// sentry end

// 定义应用目录
define('APP_PATH', __DIR__ . '/../application/');

// 加载框架引导文件
require __DIR__ . '/../thinkphp/start.php';
```

### thinkphp5 sentry 配置截图

[](#thinkphp5-sentry-配置截图)

- thinkphp/base.php 入口配置

[![thinkphp5 入口配置](tp5_base.png)](tp5_base.png)

> PS: Sentry php Thinkphp5 只能放到 thinkphp/base.php 这个文件中,放到其他地方可能导致不正常!

Tekin

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2615d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/798ee906929abfb6fc44fb15400d7f0058dc60ed0b14367a331250f980075da3?d=identicon)[tekintian](/maintainers/tekintian)

---

Top Contributors

[![tekintian](https://avatars.githubusercontent.com/u/10243043?v=4)](https://github.com/tekintian "tekintian (3 commits)")

---

Tags

sentrythinkphp5sentry tp5

### Embed Badge

![Health badge](/badges/tekintian-sentry-php/health.svg)

```
[![Health](https://phpackages.com/badges/tekintian-sentry-php/health.svg)](https://phpackages.com/packages/tekintian-sentry-php)
```

###  Alternatives

[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M273](/packages/sentry-sentry)[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k114.3M154](/packages/sentry-sentry-laravel)[sentry/sentry-symfony

Symfony integration for Sentry (http://getsentry.com)

73761.4M66](/packages/sentry-sentry-symfony)[sentry/sdk

This is a meta package of sentry/sentry. We recommend using sentry/sentry directly.

327134.8M151](/packages/sentry-sdk)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[notamedia/yii2-sentry

Yii2 logger for Sentry

1272.0M2](/packages/notamedia-yii2-sentry)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
