PHPackages                             felix-lessoer/cakephp-elasticapm - 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. felix-lessoer/cakephp-elasticapm

ActiveLibrary

felix-lessoer/cakephp-elasticapm
================================

Monitor your cakephp project with elastic APM

11PHP

Since Mar 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/felix-lessoer/cakephp_elasticapm)[ Packagist](https://packagist.org/packages/felix-lessoer/cakephp-elasticapm)[ RSS](/packages/felix-lessoer-cakephp-elasticapm/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Enable Elastic APM for your cake php project
============================================

[](#enable-elastic-apm-for-your-cake-php-project)

For now this plugin supports to collect common events from cake php. Tested in cake php v3.8 . This plugin is based on the [Elastic APM php agent](https://github.com/philkra/elastic-apm-php-agent)

Installation
------------

[](#installation)

Just use composer to setup the plugin

```
composer require felix-lessoer/cakephp-elasticapm

```

Configuration
-------------

[](#configuration)

Include this snippet in `config/app.php`

```
'ElasticApm' => [
        'enabled' => true,
        'rumEnabled' => true,
        'appName' => '',
        'appVersion' => "1.0",
        'serverUrl' => '',
        'secretToken' => '',
        'environment' => "development"
    ]
```

`enabled`: If false the collection gets deactivated

Include this snippet in `src/Application.php` in your function `bootstrap()`

```
if (Configure::read('ElasticApm.enabled')) {
    $this->addPlugin(ElasticApmPlugin::class);
}
```

Add RUM agent
-------------

[](#add-rum-agent)

The RUM agent is optional, but provides better insights into your page speed.

Download the agent [here](https://github.com/elastic/apm-agent-rum-js/releases) and add it into your `webroot/js` dirctory

Add this to into the `` area of your page ``

Add this snipped directly at the beginning of ``:

```

    var parts = window.location.pathname.split('?');
    var pageName = window.location.pathname;
    if (parts.length > 0) {
      pageName = parts[0]
    }
    if () {
      elasticApm.init({
        serviceName: ' RUM',
        serverUrl: '',
        environment: '',
        serviceVersion: '',
        pageLoadTraceId: '',
        pageLoadSpanId: '',
        pageLoadSampled: true,
        pageLoadTransactionName: pageName,
        breakdownMetrics: true,
        //monitorLongtasks: true,
      });
      //Optional adding user context
      elasticApm.setUserContext({
        id: ,
        username: ,
      });
    }

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/394d7cd040f8087b1a314034c9336abf16c9084d40d4d37cc494c19d7b266f72?d=identicon)[felix-lessoer](/maintainers/felix-lessoer)

---

Top Contributors

[![felix-lessoer](https://avatars.githubusercontent.com/u/35069463?v=4)](https://github.com/felix-lessoer "felix-lessoer (6 commits)")

### Embed Badge

![Health badge](/badges/felix-lessoer-cakephp-elasticapm/health.svg)

```
[![Health](https://phpackages.com/badges/felix-lessoer-cakephp-elasticapm/health.svg)](https://phpackages.com/packages/felix-lessoer-cakephp-elasticapm)
```

PHPackages © 2026

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