Skip to main content

New Relic Python Agent

Project description

header

New Relic Python Agent

The newrelic package instruments your application for performance monitoring and advanced performance analytics with New Relic.

Pinpoint and solve Python application performance issues down to the line of code. New Relic APM is the only tool you’ll need to see everything in your Python application, from the end user experience to server monitoring. Trace problems down to slow database queries, slow 3rd party APIs and web services, caching layers, and more. Monitor your app in a production environment and make sure your app can stand a big spike in traffic by running scalability reports.

Visit Python Application Performance Monitoring with New Relic to learn more.

Usage

This package can be installed via pip:

$ pip install newrelic

(These instructions can also be found online: Python Agent Quick Start.)

  1. Generate the agent configuration file with your license key.

    $ newrelic-admin generate-config $YOUR_LICENSE_KEY newrelic.ini
  2. Validate the agent configuration and test the connection to our data collector service.

    $ newrelic-admin validate-config newrelic.ini
  3. Integrate the agent with your web application.

    If you control how your web application or WSGI server is started, the recommended way to integrate the agent is to use the newrelic-admin wrapper script. Modify the existing startup script, prefixing the existing startup command and options with newrelic-admin run-program.

    Also, set the NEW_RELIC_CONFIG_FILE environment variable to the name of the configuration file you created above:

    $ NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program $YOUR_COMMAND_OPTIONS

    Examples:

    $ NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -c config.py test_site.wsgi
    
    $ NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program uwsgi uwsgi_config.ini

    Alternatively, you can also manually integrate the agent by adding the following lines at the very top of your python WSGI script file. (This is useful if you’re using mod_wsgi.)

    import newrelic.agent
    newrelic.agent.initialize('/path/to/newrelic.ini')
  4. Start or restart your Python web application or WSGI server.

  5. Done! Check your application in the New Relic UI to see the real time statistics generated from your application.

Additional resources may be found here:

Support

Should you need assistance with New Relic products, you are in good hands with several support diagnostic tools and support channels.

This troubleshooting framework steps you through common troubleshooting questions.

New Relic offers NRDiag, a client-side diagnostic utility that automatically detects common problems with New Relic agents. If NRDiag detects a problem, it suggests troubleshooting steps. NRDiag can also automatically attach troubleshooting data to a New Relic Support ticket.

If the issue has been confirmed as a bug or is a Feature request, please file a Github issue.

Support Channels

Privacy

At New Relic we take your privacy and the security of your information seriously, and are committed to protecting your information. We must emphasize the importance of not sharing personal data in public forums, and ask all users to scrub logs and diagnostic information for sensitive information, whether personal, proprietary, or otherwise.

We define “Personal Data” as any information relating to an identified or identifiable individual, including, for example, your name, phone number, post code or zip code, Device ID, IP address and email address.

Please review New Relic’s General Data Privacy Notice for more information.

Product Roadmap

See our roadmap, to learn more about our product vision, understand our plans, and provide us valuable feedback.

Contributing

We encourage your contributions to improve the New Relic Python Agent! Keep in mind when you submit your pull request, you’ll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at opensource@newrelic.com.

A note about vulnerabilities

As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.

If you believe you have found a security vulnerability in this project or any of New Relic’s products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.

License

The New Relic Python Agent is licensed under the Apache 2.0 License. The New Relic Python Agent also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.

Project details


Release history Release notifications | RSS feed

This version

8.6.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

newrelic-8.6.0.tar.gz (914.8 kB view hashes)

Uploaded Source

Built Distributions

newrelic-8.6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (750.5 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

newrelic-8.6.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (749.1 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

newrelic-8.6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (750.0 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

newrelic-8.6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (748.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

newrelic-8.6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (749.6 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

newrelic-8.6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (748.1 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

newrelic-8.6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (754.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

newrelic-8.6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (752.7 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

newrelic-8.6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (747.8 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

newrelic-8.6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (746.4 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

newrelic-8.6.0-cp27-cp27mu-manylinux2010_x86_64.whl (750.8 kB view hashes)

Uploaded CPython 2.7mu manylinux: glibc 2.12+ x86-64

newrelic-8.6.0-cp27-cp27mu-manylinux1_x86_64.whl (750.8 kB view hashes)

Uploaded CPython 2.7mu

newrelic-8.6.0-cp27-cp27m-manylinux2010_x86_64.whl (750.8 kB view hashes)

Uploaded CPython 2.7m manylinux: glibc 2.12+ x86-64

newrelic-8.6.0-cp27-cp27m-manylinux1_x86_64.whl (750.8 kB view hashes)

Uploaded CPython 2.7m

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page