Skip to content

Spot performance problems before they spot you! :: NewRelic Insturmentation for Odoo

License

Notifications You must be signed in to change notification settings

tarekmokhtarjr/odoo-newrelic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

New Relic Instrumentation for Odoo

Someone tells you, "Hey your site is being slow right now." What do you do? Restart Odoo? Look at Nginx access logs? Could it be PostgreSQL? We've all been there...

Get Started

  1. Install the newrelic python package through pip or from source:

` pip3 install newrelic `

  1. Create a newrelic.ini file New Relic Python Quick Start (you can skip if you'd rather use ENV variable, see (3) from below):

` newrelic-admin generate-config YOUR_LICENSE_KEY /etc/odoo-newrelic.ini `

  1. Add this module to your existing addons folder or create a new addons folder and add it to the Odoo addons path.

4) Make sure that Odoo loads and uses your New Relic details which are usually set in a New Relic configuration file. Add the New Relic configuration file to your odoo-server.conf file:

` new_relic_config_file = /etc/odoo-newrelic.ini `

Optionally you can set environment variables for the whole New Relic configuration. See New Relic Python Agent Configuration

  1. Restart your odoo process and install the 'newrelic' module in Odoo Apps. (You may need to restart your odoo server again and look at the logs for information about a misconfiguration or missing modules.)

Features

  • Web errors (like 404's) are not treated as errors.
  • Server errors (like 500's) are caught and show up in the Errors area.
  • Transactions are named by route.
  • PostgreSQL and Python metrics are easily visible.
  • Front end page metrics (page rendering) is enabled by default. (only on the front end)
  • Works in threaded (workers=0) and multi process (workers>0) modes.

'Main'

'Transactions'

'Browser'

'Errors'

'Error Detail'

Known Issues

  • Due to the nature of /longpolling, this transaction is ignored on purpose. (feature?)
  • Background tasks are not profiled.
  • Could probably use better transaction naming.

Licence

Please see LICENSE.

Copyright Hibou Corp. 2020. This module was not sponsored in any way by New Relic, I just happen to like profiling.

About

Spot performance problems before they spot you! :: NewRelic Insturmentation for Odoo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%