Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.35 KB

README.rst

File metadata and controls

53 lines (33 loc) · 1.35 KB

New Relic Python Agent Extension Scaffold

This repository provides a basic skeleton for creating instrumentation packages that plug into the Python Agent.

In this example, instrumentation is provided for the sampleproject from pypa.

Requirements

Loading New Relic python agent extensions relies on the availability of the iter_entry_points API in setuptools. Therefore, setuptools must be available in the application environment.

Getting Started

  1. Fork this repository, changing the name as appropriate.
  2. Modify the setup.py INSTRUMENTED_PACKAGE variable to point to the package you are instrumenting.
  3. Update the setup.py HOOKS variable to add packages and hook functions.

Testing

All testing can be done through tox.

pip install tox
tox

Usage

In the application, the extension can be pip installed.

pip install newrelic_extension_sampleproject

License

The contents of this repository are licensed under the terms of the Apache 2.0 License.