PHPackages                             efabrica/elastic-apm-nette-extension - 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. efabrica/elastic-apm-nette-extension

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

efabrica/elastic-apm-nette-extension
====================================

Nette extension for Elastic APM

1.x-dev(7y ago)013MITPHPPHP &gt;= 7.1

Since Jun 23Pushed 7y ago3 watchersCompare

[ Source](https://github.com/efabrica-team/elastic-apm-nette-extension)[ Packagist](https://packagist.org/packages/efabrica/elastic-apm-nette-extension)[ RSS](/packages/efabrica-elastic-apm-nette-extension/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (7)Versions (2)Used By (0)

Elastic APM Extension
=====================

[](#elastic-apm-extension)

Usage
-----

[](#usage)

**config.neon**

```
extensions:
     apm: Efabrica\NetteElasticAmp\ApmExtension

apm:
    enabled: true # optional
    config: # required (APM agent configuration)
        appName       : "Name of this application" # required
        appVersion    : "Application version" # optional, default: ''
        serverUrl     : "APM Server Endpoint" # optional, default: http://127.0.0.1:8200
        secretToken   : "Secret token for APM Server" # optional, default: null
        hostname      : "Hostname to transmit to the APM Server" # optinal, default: gethostname()
        active        : "Activate the APM Agent" # optional, default: true
        timeout       : "Guzzle Client timeout" # optional, default: 5
        apmVersion    : "APM Server Intake API version" # optional, default: 'v1'
        env           : "$_SERVER vars to send to the APM Server, empty set sends all. Keys are case sensitive" # optional, default: []
        cookies       : "Cookies to send to the APM Server, empty set sends all. Keys are case sensitive" # optional, default: []
        httpClient    : "Extended GuzzleHttp\\Client" # optional, default: []
        backtraceLimit: "Depth of a transaction backtrace" # optional, default: unlimited
    spanGenerators: # optional, default: NetteDatabaseQuerySpanGenerator::class
        - Efabrica\NetteElasticAmp\SpanGenerator\NetteDatabaseQuerySpanGenerator()
```

How to create new SpanGenerators
--------------------------------

[](#how-to-create-new-spangenerators)

Each span generator have to register processSpan() method on APM agent for events we want to capture.

```
public static function register(ContainerBuilder $containerBuilder, ServiceDefinition $apmTransaction): void
{
    // Some code ...
    $service->addSetup('
        $service->onEventStart[] = function ($param1, $param2) :void {
            (?)->processSpan(?, ?, $param1, $param2);
        }', [$apmTransaction, self::class, 'start']);
    $service->addSetup('
        $service->onEventEnd[] = function ($param1, $param2) :void {
            (?)->processSpan(?, ?, $param1, $param2);
        }', [$apmTransaction, self::class, 'end']);
}

public function process(float $transactionStart, string $method, array $params): array
{
    switch($method) {
        case 'start':
            // do something ...
            return $spans; // array with spans
        case 'end':
            // do something else ...
            return $spans; // array with spans
    }
}
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

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

Unknown

Total

1

Last Release

2564d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25289c62a88df1c404543693ba52e44748dbce486bcfab91fc8c5931a6bb38e1?d=identicon)[dev-efabrica](/maintainers/dev-efabrica)

---

Top Contributors

[![ricco24](https://avatars.githubusercontent.com/u/1409647?v=4)](https://github.com/ricco24 "ricco24 (2 commits)")

---

Tags

netteextensionelastic apm

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/efabrica-elastic-apm-nette-extension/health.svg)

```
[![Health](https://phpackages.com/badges/efabrica-elastic-apm-nette-extension/health.svg)](https://phpackages.com/packages/efabrica-elastic-apm-nette-extension)
```

###  Alternatives

[contributte/newrelic

NewRelic PHP agent integration for Nette Framework

19829.4k](/packages/contributte-newrelic)[kdyby/monolog

Integration of Monolog into Nette Framework

32700.0k10](/packages/kdyby-monolog)

PHPackages © 2026

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