{ "info": { "author": "Douwe van der Meij, Peter Uittenbroek", "author_email": "support@gw20e.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Programming Language :: Python" ], "description": "Introduction\n------------\n\nThis package offers instrumentation for NewRelic ( http://www.newrelic.com ). Currently the catalog-tool, transformchains and zope-events are instrumented. A transform is included to support RUM (Real-User-Monitoring): it inserts small snippets of javascript at the top and bottom of the rendered pages. RUM does not work in the ZMI (Zope Management Interface).\n\nInstallation\n------------\n\nYou can add this egg 'collective.newrelic' to your eggs and it will pull in the 'newrelic' egg too. ::\n\n [buildout]\n \n # either pin versions as shown below... \n versions=versions\n \n [versions]\n newrelic = 2.6.0.5\n repoze.xmliter = 0.5\n # update to 1.0.9 on next release:\n collective.newrelic = 1.0.8 \n\n # ...or allow picked versions and risk breakage on product updates\n #allow-picked-versions = true\n \n parts +=\n newrelic \n\n [newrelic]\n recipe = zc.recipe.egg:scripts\n eggs = newrelic\n \n [instance]\n eggs +=\n collective.newrelic\n \n # make sure newrelic itself is enabled and set the path to your newrelic.ini file\n environment-vars +=\n NEW_RELIC_ENABLED true\n NEW_RELIC_CONFIG_FILE ${buildout:directory}/newrelic.ini\n NEW_RELIC_ENVIRONMENT development\n \n # when using supervisor, setting environment variables is slightly different:\n #[supervisor]\n #supervisord-environment=NEW_RELIC_ENABLED=true,NEW_RELIC_CONFIG_FILE=${buildout:directory}/newrelic.ini,NEW_RELIC_ENVIRONMENT=development\n\nA number of additional settings can optionally be configured using environment variables, see http://docs.newrelic.com/docs/python/python-agent-configuration#environment-variables for details.\nCustomizing your newrelic.ini file is more advised though, see below.\n\nThe NEW_RELIC_ENABLED and NEW_RELIC_CONFIG_FILE variables need to be set for the newrelic agent to work though. \n\nOmitting NEW_RELIC_ENVIRONMENT variable will mean the [newrelic] part is loaded without additional [newrelic:YOURENVNAME] settings.\n\nPlease note: the newrelic package needs python >= 2.5. This package will not work on Plone 3.\n\nUse\n---\n\nTo enable the logging to newrelic.com, create an account at newrelic.com and get your license key. Create a 'newrelic.ini' file in the root of your project. Either by copying the template from this package or the newrelic package or run ::\n\n $ bin/newrelic-admin generate-config YOUR-LICENSE-KEY newrelic.ini\n\nThis will create a newrelic.ini file in the current directory.\n\nYou might want to validate your generated file using ``newrelic-admin validate-config newrelic.ini``\n\nThe default profile is 'staging', this can be changed in the `__init__.py` in the patches directory. You can change the default name of 'Python Application (Staging)' in the newrelic.ini file. To get sensible database-traces change ::\n\n transaction_tracer.record_sql = obfuscated\n\nto ::\n\n transaction_tracer.record_sql = raw\n \n\nExample usage\n=============\nIn utils you find a few helper functions to wrap (parts) of your products and/or plone and/or any python module.\nFor example you could make a simple egg called myproduct.newrelic with only an `__init__.py`.\nWithin that file you have a '''initialize''' function, therein you use the helper functions for further wrapping.\n\nFull class+function wrapping of an entire module\n------------------------------------------------\n::\n\n from plone.app import viewletmanager as plone_viewletmanager\n from collective.newrelic.utils import wrap_module_classes_functions\n class_function_modules = [plone_viewletmanager, ]\n wrapped_methods = wrap_module_classes_functions(class_function_modules)\n print len(wrapped_methods)\n\nSingle class wrapping \n---------------------\n:: \n\n from zope.tal.talinterpreter import TALInterpreter\n from collective.newrelic.utils import wrap_class_found_functions\n wrapped_methods = wrap_class_found_functions(TALInterpreter)\n print len(wrapped_methods)\n\nPin point precision wrapping of single class function\n-----------------------------------------------------\n::\n\n from zope.tal.talinterpreter import TALInterpreter\n from collective.newrelic.utils import wrap_class_function\n wrapped_methods = wrap_class_function(TALInterpreter, TALInterpreter.__call__)\n print wrapped_methods\n \"TALInterpreter.__call__\"\n\n\nTroubleshooting\n===============\n\nIf you see a message ``The Python Agent is not enabled.`` in the Zope instance log, first check if ``NEW_RELIC_ENABLED`` environment variable was set correctly. \n\nIf this is ok, check your ``newrelic.ini`` file and make sure the profile you are using (eg ``[newrelic:staging]``) has ``monitor_mode = true``.\n\nIt can also mean that the newrelic.ini cannot be found. Make sure the path to your newrelic.ini file is correctly set using the ``NEW_RELIC_CONFIG_FILE`` environment variable. \n\nIf you see a message ``A valid account license key cannot be found.``, check that you have a valid license key and make sure it is correctly set in the ``newrelic.ini`` file.\n\nReferences\n==========\n\n http://www.newrelic.com\n\n http://newrelic.com/docs/python/python-agent-installation\n\n http://docs.newrelic.com/docs/python/testing-the-python-agent\n\n\nChange history\n==============\n\n1.0.9 (2014-01-02)\n-------------------\n\n - Introduce and explain NEW_RELIC_ENABLED and NEW_RELIC_CONFIG_FILE enviroment variables [fiterbek]\n - Fix documentation formatting [fiterbek]\n - Print nicer info message [fiterbek]\n - Update documentation for NEW_RELIC_ENVIRONMENT enviroment variables [puittenbroek]\n\n1.0.8 (2013-10-02)\n-------------------\n\n - Fix: TALInterpreter patch fails when PageTemplate is made by value instead of file [puittenbroek]\n - Added dependency on repoze.xmliter [fiterbek]\n\n1.0.7 (2013-07-11)\n-------------------\n\n - Documentation typos [khink]\n - Documentation checking for pypi release [puittenbroek]\n - Patch cron4plone tick (if present) to make it a backgroundtask [puittenbroek]\n - Improve hook logic to worker properly in ZMI [puittenbroek]\n\n1.0.6 - unreleased\n-------------------\n\n - Changed naming of transactions, now based on view/templates being used [puittenbroek]\n - Ignore transactions for resource files (js, css, kss(?)) [puittenbroek]\n\n\n1.0.5 - unreleased\n-------------------\n\n - First production test version\n\nprior 1.0.5 \n-------------------\n - Inital code implemtation and testing", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/collective/collective.newrelic", "keywords": "", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "collective.newrelic", "package_url": "https://pypi.org/project/collective.newrelic/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.newrelic/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/collective/collective.newrelic" }, "release_url": "https://pypi.org/project/collective.newrelic/1.0.9/", "requires_dist": null, "requires_python": null, "summary": "Zope/Plone Newrelic instrumentation", "version": "1.0.9" }, "last_serial": 958316, "releases": { "1.0.7": [ { "comment_text": "", "digests": { "md5": "0acf388d3cbcde74c7d9043bb32f6fde", "sha256": "d35aa00499937b42749cdb0f5c42cadca9318d2689ce56576b5202453ac4bab8" }, "downloads": -1, "filename": "collective.newrelic-1.0.7.zip", "has_sig": false, "md5_digest": "0acf388d3cbcde74c7d9043bb32f6fde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22912, "upload_time": "2013-07-11T12:17:11", "url": "https://files.pythonhosted.org/packages/3e/d1/8a9a3cca6fda1de7596fd66cb461ea5e913538fb3ef864763b0fb992f73f/collective.newrelic-1.0.7.zip" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "73fa74875305f43b4d09c8324a286b58", "sha256": "1ae4efa15cc027064278b456f4bcdf217f6dd0c8eda6feed93065e4797932b58" }, "downloads": -1, "filename": "collective.newrelic-1.0.8.zip", "has_sig": false, "md5_digest": "73fa74875305f43b4d09c8324a286b58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36494, "upload_time": "2013-10-02T12:19:44", "url": "https://files.pythonhosted.org/packages/82/29/8f196c0a3788c7ccd03edebd5dfbf6510fd64ea3c4d2ee0e190574a04eb1/collective.newrelic-1.0.8.zip" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "695c50cf95c5ecd4928bbfb42383cd8f", "sha256": "bbd525d324ff85fb56b40a4e7e3a808ab81548af9f4ef1bc78dba5cf0997f32a" }, "downloads": -1, "filename": "collective.newrelic-1.0.9.zip", "has_sig": false, "md5_digest": "695c50cf95c5ecd4928bbfb42383cd8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38748, "upload_time": "2014-01-02T11:07:09", "url": "https://files.pythonhosted.org/packages/bc/9e/082b74bad9092f38d83abfe17fb58119f6709e9e677e9536a88795e16b34/collective.newrelic-1.0.9.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "695c50cf95c5ecd4928bbfb42383cd8f", "sha256": "bbd525d324ff85fb56b40a4e7e3a808ab81548af9f4ef1bc78dba5cf0997f32a" }, "downloads": -1, "filename": "collective.newrelic-1.0.9.zip", "has_sig": false, "md5_digest": "695c50cf95c5ecd4928bbfb42383cd8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38748, "upload_time": "2014-01-02T11:07:09", "url": "https://files.pythonhosted.org/packages/bc/9e/082b74bad9092f38d83abfe17fb58119f6709e9e677e9536a88795e16b34/collective.newrelic-1.0.9.zip" } ] }