Yii Support on NewRelic


I just wanted to share the good news with you guys, it seems like NewRelic is supporting Yii powered apps from now (in beta!), too.

If you don’t know what NewRelic is:

oh, and the link … http://support.newrelic.com/kb/php/new-relic-for-php



Interesting coincidence. I was just reading something that mentioned New Relic. PHP Fog is a PHP centric cloud hosting service. I’ve never used it, so this is not an endorsement. :) Anyway, they apparently provide New Relic as part of their package.

I’ve used New Relic with Rails apps (through Heroku) and also a big Drupal site. With the latter they specifically state there’s Drupal support but it’s not obvious exactly sure how they tailor it above regular PHP. For example it couldn’t tell the Drupal site apart from other PHP apps running on the server (without additional Apache configuration that would apply to any PHP apps).

Will have to try it with Yii. It’s great to see the framework mentioned by New Relic. They’ve sponsored a couple of podcasts I listen to and the product itself is impressive.

originally I sent them an email to sponsor the Yii podcast, but they said they don’t support the framework yet. So I told them if they successfully setup CakePHP, it shouldn’t be different. I’m glad they looked into it and decided to move forward. But you’re right. It’d probably work with any other PHP powered stuff.


I’ve developed a Yii extension which aims to simplify the process of integrating New Relic into your Yii app.

It also overcomes a problem regarding correct placement of the timing footer relative to the closing </body> tag, in addition to automatically attempting to place the timing header in the location recommended by New Relic. These two are achieved by subclassing CClientScript, which in its base form imposes some limitations on placement of JavaScript in your layout.

The initial release still is a bit cumbersome to install. Please accept my apologies for that. I will be aiming to reduce the installation complexity.

(If there are any other existing Yii New Relic extensions, I apologize, and please let me know!)

You can see the extension here:

Yii New Relic Extension


p.s. New Relic does in fact support Yii natively - I am currently in communication with their PHP team to determine what exactly this native support provides, and will likely be revising this extension accordingly. Hopefully they detect the module/controller/action ID’s automatically as this will reduce the complexity of this extension greatly.

In what way does New Relic differ from a tool like XDebug with Webgrind?

You can also see what’s going on down to the function level.