Skip to main content

Community Project header

newrelic-introspector-python

This is a CLI tool for discovering instrumentable Python applications on a system, retrieving contextual information about them, and automating the install of the New Relic python agent.

Getting Started

> python3 src/lsi.py --list
[12345]

> python3 src/lsi.js --introspect --pid 12345
{"pid": 12345, "uid": 1000, "gid": 1000, "ppid": 1, "is_python": true, "contains_python": true, "python_executable": "/usr/bin/python3", "cmd": "/usr/bin/python3 /home/ec2-user/app/main.py"}

> python3 src/lsi.py --install --pid 12345

> python3 src/lsi.py --instrument --pid 12345 --licenseKey $NEW_RELIC_LICENSE_KEY --appName "My Python Application"
...

Instrumenting processes

The instrument command automates several installation steps:

  1. Verifies that the newrelic package has been successfully installed.
  2. Generates a newrelic.ini configuration file. If one already exists, an option will be provided to keep or overwrite it.
  3. Restarts the process using the newrelic-admin script.

Instrumentation will survive further restarts, but may be lost if the application is redeployed or any other actions are taken that revert the changes above.

Support

New Relic hosts and moderates an online forum where customers can interact with New Relic employees as well as other customers to get help and share best practices. Like all official New Relic open source projects, there's a related Community topic in the New Relic Explorers Hub. You can find this project's topic/threads here:

https://discuss.newrelic.com/tags/pythonagent

Contribute

We encourage your contributions to improve newrelic-introspector-python! Keep in mind that 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 (which is required if your contribution is on behalf of a company), 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.

If you would like to contribute to this project, review these guidelines.

To all contributors, we thank you! Without your contribution, this project would not be what it is today.

License

newrelic-introspector-python is licensed under the Apache 2.0 License.

Metadata

Release files for newrelic-introspector 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for newrelic-introspector 0.0.6
File Size Uploaded
newrelic-introspector-0.0.6.tar.gz 22.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for newrelic-introspector 0.0.6
File Interpreter ABI Platform
newrelic_introspector-0.0.6-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 36.3 kB

Release files / newrelic-introspector-0.0.6.tar.gz

Download URL newrelic-introspector-0.0.6.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0a15522530a683484621d9c243e5eae6968e61d4628021668d17f0b160936573
BLAKE2b-256 checksum
How to use checksums
aa15fb0c290057d269b8c4dbcc412b1d17184222c9d4f9db68e01234261226f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / newrelic_introspector-0.0.6-py2.py3-none-any.whl

Download URL newrelic_introspector-0.0.6-py2.py3-none-any.whl
Size 13.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f7785ad3a5ee8a726f23aee6fd8ed64837ee6955d34e3b0f11e3a4ed93dd8e03
BLAKE2b-256 checksum
How to use checksums
368b81c33631cbc1482c99cc97601e3b6c196b70e1e6a94af66b72515e17881e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page