PHPackages                             topthink/think-tracing - 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. topthink/think-tracing

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

topthink/think-tracing
======================

Distributed tracing for ThinkPHP made easy

v1.0.13(1y ago)869226MITPHPPHP &gt;=7.1.0

Since Jan 29Pushed 1y ago2 watchersCompare

[ Source](https://github.com/top-think/think-tracing)[ Packagist](https://packagist.org/packages/topthink/think-tracing)[ RSS](/packages/topthink-think-tracing/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (15)Used By (6)

ThinkPHP链路追踪组件
==============

[](#thinkphp链路追踪组件)

安装
--

[](#安装)

> composer require topthink/think-tracing

### 支持两种驱动zipkin、jaeger 分别需要安装

[](#支持两种驱动zipkinjaeger-分别需要安装)

> composer require jcchavezs/zipkin-opentracing
> composer require jonahgeorge/jaeger-client-php

使用
--

[](#使用)

### 1. 中间件

[](#1-中间件)

扩展内提供了`think\tracing\middleware\TraceRequests`中间，配置到路由里或者全局中间件

### 2. 错误处理

[](#2-错误处理)

> 使用了中间件后，该组件默认会跟踪到错误
> 配置文件里errors设置为false可以关闭

### 3.异步上报数据

[](#3异步上报数据)

> 配置`async`,数据临时存储到redis,单独起一个进程`php think tracing:report`来上报数据

### 4. 其他使用方法参考 [opentracing](https://github.com/opentracing/opentracing-php)

[](#4-其他使用方法参考-opentracing)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance47

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% 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

Every ~118 days

Recently: every ~163 days

Total

14

Last Release

399d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7858077?v=4)[topthink](/maintainers/topthink)[@topthink](https://github.com/topthink)

---

Top Contributors

[![yunwuxin](https://avatars.githubusercontent.com/u/2168125?v=4)](https://github.com/yunwuxin "yunwuxin (26 commits)")[![smithyj](https://avatars.githubusercontent.com/u/9820142?v=4)](https://github.com/smithyj "smithyj (2 commits)")

### Embed Badge

![Health badge](/badges/topthink-think-tracing/health.svg)

```
[![Health](https://phpackages.com/badges/topthink-think-tracing/health.svg)](https://phpackages.com/packages/topthink-think-tracing)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[marvinlabs/laravel-discord-logger

Logging to a discord channel in Laravel

2081.1M2](/packages/marvinlabs-laravel-discord-logger)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299549.3k1](/packages/larabug-larabug)[honeybadger-io/honeybadger-php

Honeybadger PHP library

381.5M4](/packages/honeybadger-io-honeybadger-php)

PHPackages © 2026

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