Giter Site home page Giter Site logo

yireo_newrelic's Introduction

Magento module for New Relic ©

Homepage: http://www.yireo.com/software/magento-extensions/newrelic

Steps to get it working:

  • Make sure to install New Relic on your server first
  • Make sure to have New Relics PHP-module installed and active
  • Upload the files in the source/ folder to your site
  • Flush the Magento cache
  • Configure settings under System > Configuration > Advanced > New Relic
  • Done

Instructions for using composer

Use composer to install this extension. First make sure to initialize composer with the right settings:

composer -n init
composer install --no-dev

Next, modify your local composer.json file:

{
    "require": {
        "yireo/magento1-newrelic": "dev-master",
        "magento-hackathon/magento-composer-installer": "*"
    },    
    "repositories":[
        {
            "packagist": false
        },
        {
            "type":"composer",
            "url":"https://packages.firegento.com"
        },
        {
            "type":"composer",
            "url":"https://satis.yireo.com"
        }
    ],
    "extra":{
        "magento-root-dir":"/path/to/magento",
        "magento-deploystrategy":"copy"           
    }
}

Make sure to set the magento-root-dir properly. Test this by running:

composer update --no-dev

Done.

yireo_newrelic's People

Contributors

jissereitsma avatar

Stargazers

Michael Davidsen avatar Milan Davídek avatar Mark avatar Jared avatar  avatar Sam Infante avatar  avatar Guillermo Castro avatar Cristiano avatar Achim Rosenhagen avatar Dmitrii D avatar  avatar Dean Williams avatar Sylvain Jaune avatar Timon de Groot avatar v ₿ avatar Jonas Lind avatar Daniel Smith avatar Alec Bedzir avatar Kostiantyn Pogribnyi avatar Silv avatar Daniel Vidaurre avatar Andrei Bodeanschi avatar Alexei Smirnov avatar Denis Ristic avatar Cristian Nicolescu avatar Joe Constant avatar Florent avatar LA Magento avatar Ramsay Bell avatar Sebastian Enders avatar Oğuz Çelikdemir avatar Robbie Player avatar

Watchers

Michael Davidsen avatar James Cloos avatar Sebastian Enders avatar  avatar  avatar

yireo_newrelic's Issues

Error after installing module

I have two virtual hosts on the same server one live one and one staging one. I copied the files from source/ as specified and it's working fine on the live site but the second stage site is giving me the following error:

There has been an error processing your request
Exception printing is disabled by default for security reasons.

Error log record number: 712534139284

When viewing the error I see this:

a:5:{i:0;s:63:"Mage registry key "_singleton/newrelic/observer" already exists";i:1;s:1473:"#0 /www/sites/stage.example.com/files/html/app/Mage.php(223): Mage::throwException('Mage registry k...')
#1 /www/sites/stage.example.com/files/html/app/Mage.php(477): Mage::register('_singleton/newr...', false)
#2 /www/sites/stage.example.com/files/html/includes/src/__default.php(31396): Mage::getSingleton('newrelic/observ...')
#3 /www/sites/stage.example.com/files/html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#4 /www/sites/stage.example.com/files/html/includes/src/__default.php(24071): Mage::dispatchEvent('controller_acti...', Array)
#5 /www/sites/stage.example.com/files/html/includes/src/__default.php(24689): Mage_Core_Controller_Varien_Action->postDispatch()
#6 /www/sites/stage.example.com/files/html/includes/src/__default.php(23942): Mage_Core_Controller_Front_Action->postDispatch()
#7 /www/sites/stage.example.com/files/html/includes/src/__default.php(28300): Mage_Core_Controller_Varien_Action->dispatch('index')
#8 /www/sites/stage.example.com/files/html/includes/src/__default.php(27834): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 /www/sites/stage.example.com/files/html/includes/src/__default.php(30434): Mage_Core_Controller_Varien_Front->dispatch()
#10 /www/sites/stage.example.com/files/html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#11 /www/sites/stage.example.com/files/html/index.php(93): Mage::run('base', 'website')
#12 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

I cleared the Magento cache, memcache, and am still getting the error I am not sure where this key exist or where I can remove it or modify it. Is the live site overriding the staging site and not allowing it to load?

Support for PHP 7.2

Magento just recently announced that they will be openly supporting PHP 7.2 for the magento 1 instance and have also recently just released a patch.

Does anyone know if this plugin will be compatible with PHP 7.2 or if a patch is planning on being developed here as well?

Parameter to newrelic_custom_metric must be a double

Hi,

In the following code lines the second parameter must be a double as per NewRelic specs. It's a fairly simple code change to change it to 1.0 instead of 1

https://github.com/yireo/Yireo_NewRelic/blob/master/source/app/code/community/Yireo/NewRelic/Model/Observer.php#L149

newrelic_custom_metric('Magento/' . get_class($object) . '_Save', 1);

Must be:

newrelic_custom_metric('Magento/' . get_class($object) . '_Save', 1.0);

https://github.com/yireo/Yireo_NewRelic/blob/master/source/app/code/community/Yireo/NewRelic/Model/Observer.php#L172

newrelic_custom_metric('Magento/' . get_class($object) . '_Delete', 1);

Must be:

newrelic_custom_metric('Magento/' . get_class($object) . '_Delete', 1.0);

Reference this issue.
https://github.com/chregu/hhvm-newrelic-ext/issues/7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.