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.15(3w ago)871926MITPHPPHP &gt;=7.1.0

Since Jan 29Pushed 3w 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 today

READMEChangelog (10)Dependencies (10)Versions (17)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

50

—

FairBetter than 95% of packages

Maintenance95

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% 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 ~130 days

Recently: every ~258 days

Total

16

Last Release

23d 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 (28 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

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)[spatie/flare-client-php

Send PHP errors to Flare

177161.5M23](/packages/spatie-flare-client-php)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)

PHPackages © 2026

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