# New Relic Methoden und Actions

**URL:** https://forum.shopware.com/t/new-relic-methoden-und-actions/35372
**Category:** Programmierung
**Created:** [18. März 2016 um 00:54 UTC](https://forum.shopware.com/t/new-relic-methoden-und-actions/35372 "2016-03-18T00:54:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![simdlx](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@simdlx](https://forum.shopware.com/u/simdlx)
#### Post date: [18. März 2016 um 00:54 UTC](https://forum.shopware.com/t/new-relic-methoden-und-actions/35372/1 "2016-03-18T00:54:29Z")

</div>

Hallo,&nbsp;

nachdem ich den New Relic Agent installiert und konfiguriert habe,&nbsp;werden alle Transactions über die _/shopware.php_ abgewickelt. Das ist für eine Analyse nicht wirklich hilfreich. Ich hätte gerne in den Transaktionen eine detailiertere Auflistung der Methoden und Aktionen.&nbsp;

Laut New Relic Doku kann man das im Routing der App implementieren:&nbsp;[https://docs.newrelic.com/docs/agents/php-agent/frameworks-libraries/php-frameworks-integrating-support-new-relic](https://docs.newrelic.com/docs/agents/php-agent/frameworks-libraries/php-frameworks-integrating-support-new-relic)

Kann mir jemand sagen, wo und wie ich im shopware code das ganze einbaue?

Vielen Dank

---

<div class="post-metadata">

### Author: ![Heiner\_Lohaus](https://avatars.discourse-cdn.com/v4/letter/h/b5a626/32.png) [@Heiner\_Lohaus](https://forum.shopware.com/u/Heiner_Lohaus)
#### Post date: [18. März 2016 um 08:30 UTC](https://forum.shopware.com/t/new-relic-methoden-und-actions/35372/2 "2016-03-18T08:30:57Z")

</div>

Hi,

du kannst dir dafür ein kleines Plugin anlegen. Im Support hatte ich damit schon mal angefangen:

```
    public function install()
    {
        $this->subscribeEvent(
            'Enlight_Controller_Action_PostDispatch',
            'onPostDispatch',
            100
        );
        return true;
    }

    public function onPostDispatch(Enlight_Controller_ActionEventArgs $args)
    {
        $request = $args->getSubject()->Request();
        $response = $args->getSubject()->Response();

        if (!$request->isDispatched() || $response->isException()) {
            return;
        }

        if (extension_loaded('newrelic')) {
            newrelic_name_transaction ($request->getControllerName() . '/' . $request->getActionName());
        }
    }

```

gruß Heiner

---

<div class="post-metadata">

### Author: ![simdlx](https://avatars.discourse-cdn.com/v4/letter/s/ebca7d/32.png) [@simdlx](https://forum.shopware.com/u/simdlx)
#### Post date: [23. März 2016 um 21:11 UTC](https://forum.shopware.com/t/new-relic-methoden-und-actions/35372/3 "2016-03-23T21:11:07Z")

</div>

Super Vielen Dank!

---

<div class="post-metadata">

### Author: ![Yafar\_iSi](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/yafar_isi/32/10765_2.png) [@Yafar\_iSi](https://forum.shopware.com/u/Yafar_iSi)
#### Post date: [23. August 2019 um 13:25 UTC](https://forum.shopware.com/t/new-relic-methoden-und-actions/35372/4 "2019-08-23T13:25:07Z")

</div>

How do you install this??
