PHPackages                             megaease/easeagent-sdk-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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. megaease/easeagent-sdk-php

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

megaease/easeagent-sdk-php
==========================

A Easeagent instrumentation for PHP

0.0.2(3y ago)23Apache-2.0PHPPHP ^7.4 || ^8.0

Since Dec 15Pushed 3y ago4 watchersCompare

[ Source](https://github.com/megaease/easeagent-sdk-php)[ Packagist](https://packagist.org/packages/megaease/easeagent-sdk-php)[ Docs](https://github.com/megaease/easeagent-sdk-php)[ RSS](/packages/megaease-easeagent-sdk-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (13)Versions (3)Used By (0)

easeagent-sdk-php
=================

[](#easeagent-sdk-php)

- [easeagent-sdk-php](#easeagent-sdk-php)
    - [Overview](#overview)
        - [Principles](#principles)
    - [Features](#features)
    - [QuickStart](#quickstart)
        - [1. Installing via Composer](#1-installing-via-composer)
        - [2. Use](#2-use)
        - [3. Init Agent](#3-init-agent)
        - [4. Server Span](#4-server-span)
    - [Documentation](#documentation)
    - [Example](#example)
    - [About MegaEase Cloud](#about-megaease-cloud)
    - [Community](#community)
    - [Licenses](#licenses)

A lightweight &amp; opening PHP SDK for Cloud-Native and APM system

Overview
--------

[](#overview)

- EaseAgent SDK can collect distributed application tracing, which could be used in the APM system and improve the observability of a distributed system. for the tracing, EaseAgent SDK follows the [Google Dapper](https://research.google/pubs/pub36356/) paper and use [zipkin-php](https://github.com/openzipkin/zipkin-php) core library.
- EaseAgent SDK also can work with Cloud-Native architecture.
- EaseAgent SDK also can work with [MegaEase Cloud](https://cloud.megaease.com/). For example, it can monitor for service by PHP Docker APP.

### Principles

[](#principles)

- Safe to PHP application/service.
- Highly extensible, users can easily do extensions through the api
- Design for Micro-Service architecture, collecting the data from a service perspective.

Features
--------

[](#features)

- Easy to use. It is right out of the box for Http Server Tracing.

    - Collecting Tracing Logs.
        - Http Server
        - Client
    - Decorate the Span API for Middleware
- Data Reports

    - Console Reporter.
    - Http Reporter.
- Standardization

    - The tracing data format is fully compatible with the Zipkin data format.

QuickStart
----------

[](#quickstart)

First ***production ready***, simple and full Easeagent SDK implementation without dependencies.

### 1. Installing via Composer

[](#1-installing-via-composer)

easeagent-sdk-php can be installed via Composer:

```
$ composer require megaease/easeagent-sdk-php
```

### 2. Use

[](#2-use)

```
use Easeagent\AgentBuilder;
```

### 3. Init Agent

[](#3-init-agent)

```
// new tracing agent from yaml file.
// If you want to publish the `docker app` through the `cloud of megaease` and send the monitoring data to the `cloud`,
// please obtain the configuration file path through the environment variable `EASEAGENT_CONFIG`.
// We will pass it to you the `cloud configuration` file path.
$agent = AgentBuilder::buildFromYaml(getenv('EASEAGENT_CONFIG'));//by default: Console Reporter
```

### 4. Server Span

[](#4-server-span)

```
$agent->serverReceive(function ($span) use ($agent) {
    echo "Welcome to PHP";
});
```

Documentation
-------------

[](#documentation)

[About Config](./doc/about-config.md)

Example
-------

[](#example)

Obs. for a more complete router/frontend/backend example, check [this repository](https://github.com/megaease/easeagent-sdk-php-example)

About MegaEase Cloud
--------------------

[](#about-megaease-cloud)

1. [Use SDK in MegaEase Cloud](./doc/how-to-use.md)
2. Get MegaEase Cloud Config. [About MegaEase Cloud Config](./doc/megaease-cloud-config.md)
3. [Decorate the Span](./doc/middleware-span.md). please use api: `Agent.startMiddlewareSpan` for decorate Span.

Community
---------

[](#community)

- [Github Issues](https://github.com/megaease/easeagent-sdk-php/issues)
- [Join Slack Workspace](https://join.slack.com/t/openmegaease/shared_invite/zt-upo7v306-lYPHvVwKnvwlqR0Zl2vveA) for requirement, issue and development.
- [MegaEase on Twitter](https://twitter.com/megaease)

If you have any questions, welcome to discuss them in our community. Welcome to join!

Licenses
--------

[](#licenses)

EaseAgent PHP SDK is licensed under the Apache License, Version 2.0. See [LICENSE](./LICENSE) for the full license text.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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

Every ~103 days

Total

2

Last Release

1138d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e190c84b771f8b85e3e543b5c683dac935f50f900a25d93c1d9d9db37246ab8d?d=identicon)[MegaEase](/maintainers/MegaEase)

---

Top Contributors

[![observeralone](https://avatars.githubusercontent.com/u/2154379?v=4)](https://github.com/observeralone "observeralone (28 commits)")

---

Tags

tracingzipkinopenzipkindistributed-tracingeaseagent-sdk-php

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/megaease-easeagent-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/megaease-easeagent-sdk-php/health.svg)](https://phpackages.com/packages/megaease-easeagent-sdk-php)
```

###  Alternatives

[openzipkin/zipkin

A Zipkin instrumentation for PHP

2774.3M35](/packages/openzipkin-zipkin)[datadog/dd-trace

PHP APM Client

54720.5M15](/packages/datadog-dd-trace)[whitemerry/phpkin

PHP Zipkin implementation

7726.5k3](/packages/whitemerry-phpkin)[laradumps/laradumps-core

LaraDumps is a friendly app designed to boost your Laravel / PHP coding and debugging experience.

261.2M13](/packages/laradumps-laradumps-core)[vinelab/tracing-laravel

Distributed tracing for Laravel made easy

80118.7k1](/packages/vinelab-tracing-laravel)[auxmoney/opentracing-bundle-core

Symfony Opentracing bundle to easily enable distributed tracing

25904.4k9](/packages/auxmoney-opentracing-bundle-core)

PHPackages © 2026

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