diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index e92f9f1362..2e9141cb60 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,5 +1,5 @@ --- -name: "Bug report \U0001F41B" +name: Bug report about: Create a report to help us improve title: '' labels: bug, needs-triage @@ -7,25 +7,25 @@ assignees: '' --- -[NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ ) +^^ Provide a general summary of the issue in the title above. ^^ -**Description** -[NOTE]: # ( Describe the problem you're encountering. ) -[TIP]: # ( Do NOT share sensitive information, whether personal, proprietary, or otherwise! ) +## Description +Describe the problem you're encountering. +TIP: Do NOT share sensitive information, whether personal, proprietary, or otherwise! -**Expected Behavior** -[NOTE]: # ( Tell us what you expected to happen. ) +## Expected Behavior +Tell us what you expected to happen. -**[Troubleshooting](https://discuss.newrelic.com/t/troubleshooting-frameworks/108787) or [NR Diag](https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics) results** -[NOTE]: # ( Provide any other relevant log data. ) -[TIP]: # ( Scrub logs and diagnostic information for sensitive information ) +## [Troubleshooting](https://forum.newrelic.com/s/hubtopic/aAX8W0000008bSoWAI/troubleshooting-frameworks) or [NR Diag](https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics) results +Provide any other relevant log data. +TIP: Scrub logs and diagnostic information for sensitive information. -**Steps to Reproduce** -[NOTE]: # ( Please be as specific as possible. ) -[TIP]: # ( Link a sample application that demonstrates the issue. ) +## Steps to Reproduce +Please be as specific as possible. +TIP: Link a sample application that demonstrates the issue. -**Your Environment** -[TIP]: # ( Include as many relevant details about your environment as possible including the running version of New Relic software and any relevant configurations. ) +## Your Environment +Include as many relevant details about your environment as possible including the running version of the Python agent, the Python version being used and any other relevant environment information. -**Additional context** -[TIP]: # ( Add any other context about the problem here. For example, relevant community posts or support tickets. ) +## Additional context +Add any other context about the problem here. For example, relevant community posts or support tickets. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index d7689e70ea..67de9c3636 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -15,5 +15,5 @@ blank_issues_enabled: false contact_links: - name: Troubleshooting - url: https://github.com/newrelic/newrelic-python-agent/blob/main/README.rst#support + url: https://github.com/newrelic/newrelic-python-agent/blob/main/README.md#support about: checkout the README for troubleshooting directions diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md new file mode 100644 index 0000000000..87a993e7c7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -0,0 +1,26 @@ +--- +name: Enhancement request +about: Suggest an idea for a future version of this project +title: '' +labels: enhancement, needs-triage +assignees: '' +--- + +^^ Provide a general summary of the request in the title above. ^^ + +## Summary + +Provide a brief overview of what the new feature is all about. + +## Desired Behavior + +Tell us how the new feature should work. Be specific. +TIP: Do NOT give us access or passwords to your New Relic account or API keys! + +## Possible Solution + +Not required. Suggest how to implement the addition or change. + +## Additional context + +[TIP]: Why does this feature matter to you? What unique circumstances do you have? \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 1ee520fbfb..0000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -### Is your feature request related to a problem? Please describe. -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -### Feature Description -A clear and concise description of the feature you want or need. - -### Describe Alternatives -A clear and concise description of any alternative solutions or features you've considered. Are there examples you could link us to? - -### Additional context -Add any other context here. - -### Priority -Please help us better understand this feature request by choosing a priority from the following options: -[Nice to Have, Really Want, Must Have, Blocker] diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ef3920edef..aa7f18252a 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ -_Before contributing, please read our [contributing guidelines](https://github.com/newrelic/newrelic-python-agent/blob/main/CONTRIBUTING.rst) and [code of conduct](https://github.com/newrelic/.github/blob/master/CODE_OF_CONDUCT.md)._ +_Before contributing, please read our [contributing guidelines](https://github.com/newrelic/newrelic-python-agent/blob/main/CONTRIBUTING.md) and [code of conduct](https://github.com/newrelic/.github/blob/master/CODE_OF_CONDUCT.md)._ # Overview Describe the changes present in the pull request @@ -10,6 +10,6 @@ Include a link to the related GitHub issue, if applicable The agent includes a suite of tests which should be used to verify your changes don't break existing functionality. These tests will run with Github Actions when a pull request is made. More details on running the tests locally can be found -[here](https://github.com/newrelic/newrelic-python-agent/blob/main/CONTRIBUTING.rst#testing-guidelines), +[here](https://github.com/newrelic/newrelic-python-agent/blob/main/CONTRIBUTING.md#testing-guidelines), For most contributions it is strongly recommended to add additional tests which exercise your changes. diff --git a/.mega-linter.yml b/.mega-linter.yml index 95a32f3901..790e6b5a70 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -15,9 +15,6 @@ ENABLE_LINTERS: # If you use ENABLE_LINTERS variable, all other linters will be - MARKDOWN_MARKDOWNLINT - PYTHON_RUFF - PYTHON_RUFF_FORMAT - - RST_RST_LINT - - RST_RSTCHECK - - RST_RSTFMT - YAML_PRETTIER - YAML_V8R - YAML_YAMLLINT @@ -26,3 +23,6 @@ PYTHON_RUFF_CONFIG_FILE: pyproject.toml PYTHON_RUFF_CLI_LINT_MODE: project PYTHON_RUFF_FORMAT_CONFIG_FILE: pyproject.toml PYTHON_RUFF_FORMAT_CLI_LINT_MODE: project +MARKDOWN_MARKDOWN_LINK_CHECK_FILTER_REGEX_EXCLUDE: "tests/.*" +MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: "tests/.*" +MARKDOWN_MARKDOWNLINT_ARGUMENTS: "--disable=MD041" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..a6e619ecac --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,197 @@ +# Contributing to the Python Agent + +Thanks for your interest in contributing to the +`New Relic Python Agent`! We look forward to engaging with you. + +## How to Contribute + +Contributions are always welcome. Before contributing please read the +[code of +conduct](https://github.com/newrelic/.github/blob/main/CODE_OF_CONDUCT.md) +and [search the issue tracker](https://github.com/newrelic/newrelic-python-agent/issues); your issue may have +already been discussed or fixed in [main]{.title-ref}. To contribute, +[fork](https://help.github.com/articles/fork-a-repo/) this repository, +commit your changes, and [send a Pull +Request](https://help.github.com/articles/using-pull-requests/). + +Note that our [code of +conduct](https://github.com/newrelic/.github/blob/main/CODE_OF_CONDUCT.md) +applies to all platforms and venues related to this project; please +follow it in all your interactions with the project and its +participants. + +## How to Get Help or Ask Questions + +Do you have questions or are you experiencing unexpected behaviors after +modifying this Open Source Software? Please engage with the "Build on +New Relic" space in the [Explorers +Hub](https://discuss.newrelic.com/c/build-on-new-relic/Open-Source-Agents-SDKs), +New Relic\'s Forum. Posts are publicly viewable by anyone, please do not +include PII or sensitive information in your forum post. + +## Contributor License Agreement ("CLA") + +We\'d love to get your contributions to improve the Python Agent! 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\'d like to execute our corporate CLA, +or if you have any questions, please drop us an email at +. + +For more information about CLAs, please check out Alex Russell\'s +excellent post, [Why Do I Need to Sign +This?](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/). + +## Feature Requests + +Feature requests should be submitted in the [Issue +tracker](https://github.com/newrelic/newrelic-python-agent/issues), with a description of the expected behavior & +use case, where they\'ll remain closed until sufficient interest, [e.g. +:+1: +reactions](https://help.github.com/articles/about-discussions-in-issues-and-pull-requests/), +has been [shown by the +community](https://github.com/newrelic/newrelic-python-agent/issues?q=label%3A%22votes+needed%22+sort%3Areactions-%2B1-desc). +Before submitting an Issue, please search for similar ones in the +[closed +issues](https://github.com/newrelic/newrelic-python-agent/issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement). + +## Filing Issues & Bug Reports + +We use GitHub issues to track public issues and bugs. If possible, +please provide a link to an example app or gist that reproduces the +issue. When filing an issue, please ensure your description is clear and +includes the following information. + +- Project version (ex: 1.4.0) +- Custom configurations (ex: flag=true) +- Any modifications made to the Python Agent + +### A note about vulnerabilities + +New Relic is committed to the 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 +[our bug bounty program](https://docs.newrelic.com/docs/security/security-privacy/information-security/report-security-vulnerabilities/). + +## Setting Up Your Environment + +This Open Source Software can be used in a large number of environments, +all of which have their own quirks and best practices. As such, while we +are happy to provide documentation and assistance for unmodified Open +Source Software, we cannot provide support for your specific +environment. + +## Developing Inside a Container + +To avoid the issues involved with setting up a local environment, +consider using our prebuilt development container to easily create an +environment on demand with a wide selection of Python versions +installed. This also comes with the +[tox](https://github.com/tox-dev/tox) tool (See Testing Guidelines) and +a few packages preinstalled. + +While we cannot provide direct support in setting up your environment to +work with this container, we develop it in the open and provide this +documentation to help reduce the setup burden on new contributors. + +### Prerequisites + +1. Install [Docker](https://www.docker.com/) for you local operating + system. + +2. Login to the [GitHub Container + Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic) + through Docker. + +3. + + Install Either: + + : - [VS Code](https://code.visualstudio.com/) onto your local + system (recommended). + - The [Dev Container + CLI](https://github.com/devcontainers/cli) in your terminal. + (Requires a local copy of + [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).) + +### Steps for VS Code + +1. Ensure Docker is running. +2. Install the [VS Code Extension for Dev + Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) + into VS Code. +3. In VS Code, open the command pallette (Ctrl-Shift-P on Windows/Linux + or Cmd-Shift-P on Mac) and search for and run \"Dev Containers: + Rebuild and Reopen in Container\". +4. Wait for the container to build and start. This may take a long time + to pull the first time the container is run, subsequent runs should + be faster thanks to caching. +5. To update your container, open the command pallette and run \"Dev + Containers: Rebuild Without Cache and Reopen in Container\". + +### Steps for Command Line Editor Users (vim, etc.) + +1. Ensure Docker is running. +2. From the root of this repository, run + `devcontainer up --workspace-folder=.` to start the container. The + running container ID will be displayed, which is useful for + subsequent steps. +3. To gain shell access to the container, run + `docker exec -it /bin/bash`. Alternative shells + include `zsh` and `fish`. +4. Navigate to the `/workspaces` folder to find your source code. +5. To stop the container, run `exit` on any open shells and then run + `docker stop `. `docker ps` may be helpful for finding + the ID if you\'ve lost it. + +### Personalizing Your Container + +1. If you use a dotfiles repository (such as + [chezmoi](https://www.chezmoi.io/)), you can configure your + container to clone and install your dotfiles using [VS Code dotfile + settings](https://code.visualstudio.com/docs/devcontainers/containers#_personalizing-with-dotfile-repositories). +2. To install extra packages and features, you can edit your local copy + of the .devcontainer/devcontainer.json file to use specific [Dev + Container Features](https://containers.dev/features). A few common + needs are already included but commented out. + +## Pull Request Guidelines + +Before we can accept a pull request, you must sign our [Contributor +Licensing Agreement](#contributor-license-agreement-cla), if you have +not already done so. This grants us the right to use your code under the +same Apache 2.0 license as we use for this project in general. + +Minimally, the [test suite](#testing-guidelines) must pass for us to +accept a PR. Ideally, we would love it if you also added appropriate +tests if you\'re implementing a feature! + +Please note that integration tests will be run internally before +contributions are accepted. + +Additionally: + +1. Ensure any install or build dependencies are removed before the end + of the layer when doing a build. +2. Increase the version numbers in any examples files and the README.md + to the new version that this Pull Request would represent. The + versioning scheme we use is [SemVer](http://semver.org/). +3. You may merge the Pull Request in once you have the sign-off of two + other developers, or if you do not have permission to do that, you + may request the second reviewer to merge it for you. + +## Testing Guidelines + +The Python Agent uses [tox](https://github.com/tox-dev/tox) for testing. +The repository uses tests in tests/. + +You can run these tests by entering the tests/ directory and then +entering the directory of the tests you want to run. Then, run the +following command: + +`tox -c tox.ini -e [test environment]` diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst deleted file mode 100644 index d525b7df4d..0000000000 --- a/CONTRIBUTING.rst +++ /dev/null @@ -1,230 +0,0 @@ -################################## - Contributing to the Python Agent -################################## - -Thanks for your interest in contributing to the ``New Relic Python -Agent``! We look forward to engaging with you. - -******************* - How to Contribute -******************* - -Contributions are always welcome. Before contributing please read the -`code of conduct -`__ -and `search the issue tracker <../../issues>`__; your issue may have -already been discussed or fixed in `main`. To contribute, `fork -`__ this repository, -commit your changes, and `send a Pull Request -`__. - -Note that our `code of conduct -`__ -applies to all platforms and venues related to this project; please -follow it in all your interactions with the project and its -participants. - -********************************** - How to Get Help or Ask Questions -********************************** - -Do you have questions or are you experiencing unexpected behaviors after -modifying this Open Source Software? Please engage with the “Build on -New Relic” space in the `Explorers Hub -`__, -New Relic's Forum. Posts are publicly viewable by anyone, please do not -include PII or sensitive information in your forum post. - -*************************************** - Contributor License Agreement (“CLA”) -*************************************** - -We'd love to get your contributions to improve the Python Agent! 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'd like to execute our corporate CLA, or if -you have any questions, please drop us an email at -opensource@newrelic.com. - -For more information about CLAs, please check out Alex Russell's -excellent post, `Why Do I Need to Sign This? -`__. - -****************** - Feature Requests -****************** - -Feature requests should be submitted in the `Issue tracker -<../../issues>`__, with a description of the expected behavior & use -case, where they'll remain closed until sufficient interest, `e.g. :+1: -reactions -`__, -has been `shown by the community -<../../issues?q=label%3A%22votes+needed%22+sort%3Areactions-%2B1-desc>`__. -Before submitting an Issue, please search for similar ones in the -`closed issues -<../../issues?q=is%3Aissue+is%3Aclosed+label%3Aenhancement>`__. - -***************************** - Filing Issues & Bug Reports -***************************** - -We use GitHub issues to track public issues and bugs. If possible, -please provide a link to an example app or gist that reproduces the -issue. When filing an issue, please ensure your description is clear and -includes the following information. - -- Project version (ex: 1.4.0) -- Custom configurations (ex: flag=true) -- Any modifications made to the Python Agent - -A note about vulnerabilities -============================ - -New Relic is committed to the 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 -`__. - -***************************** - Setting Up Your Environment -***************************** - -This Open Source Software can be used in a large number of environments, -all of which have their own quirks and best practices. As such, while we -are happy to provide documentation and assistance for unmodified Open -Source Software, we cannot provide support for your specific -environment. - -******************************* - Developing Inside a Container -******************************* - -To avoid the issues involved with setting up a local environment, -consider using our prebuilt development container to easily create an -environment on demand with a wide selection of Python versions -installed. This also comes with the `tox -`__ tool (See Testing Guidelines) and a -few packages preinstalled. - -While we cannot provide direct support in setting up your environment to -work with this container, we develop it in the open and provide this -documentation to help reduce the setup burden on new contributors. - -Prerequisites: -============== - -#. Install `Docker `__ for you local operating - system. - -#. Login to the `GitHub Container Registry - `__ - through Docker. - -#. Install Either: - - `VS Code `__ onto your local - system (recommended). - - - The `Dev Container CLI - `__ in your terminal. - (Requires a local copy of `npm - `__.) - -Steps for VS Code: -================== - -#. Ensure Docker is running. - -#. Install the `VS Code Extension for Dev Containers - `__ - into VS Code. - -#. In VS Code, open the command pallette (Ctrl-Shift-P on Windows/Linux - or Cmd-Shift-P on Mac) and search for and run "Dev Containers: - Rebuild and Reopen in Container". - -#. Wait for the container to build and start. This may take a long time - to pull the first time the container is run, subsequent runs should - be faster thanks to caching. - -#. To update your container, open the command pallette and run "Dev - Containers: Rebuild Without Cache and Reopen in Container". - -Steps for Command Line Editor Users (vim, etc.): -================================================ - -#. Ensure Docker is running. - -#. From the root of this repository, run ``devcontainer up - --workspace-folder=.`` to start the container. The running container - ID will be displayed, which is useful for subsequent steps. - -#. To gain shell access to the container, run ``docker exec -it - /bin/bash``. Alternative shells include ``zsh`` and - ``fish``. - -#. Navigate to the ``/workspaces`` folder to find your source code. - -#. To stop the container, run ``exit`` on any open shells and then run - ``docker stop ``. ``docker ps`` may be helpful for - finding the ID if you've lost it. - -Personalizing Your Container: -============================= - -#. If you use a dotfiles repository (such as `chezmoi - `__), you can configure your container to - clone and install your dotfiles using `VS Code dotfile settings - `__. - -#. To install extra packages and features, you can edit your local copy - of the .devcontainer/devcontainer.json file to use specific `Dev - Container Features `__. A few common - needs are already included but commented out. - -************************* - Pull Request Guidelines -************************* - -Before we can accept a pull request, you must sign our `Contributor -Licensing Agreement <#contributor-license-agreement-cla>`__, if you have -not already done so. This grants us the right to use your code under the -same Apache 2.0 license as we use for this project in general. - -Minimally, the `test suite <#testing-guidelines>`__ must pass for us to -accept a PR. Ideally, we would love it if you also added appropriate -tests if you're implementing a feature! - -Please note that integration tests will be run internally before -contributions are accepted. - -Additionally: - -#. Ensure any install or build dependencies are removed before the end - of the layer when doing a build. - -#. Increase the version numbers in any examples files and the README.md - to the new version that this Pull Request would represent. The - versioning scheme we use is `SemVer `__. - -#. You may merge the Pull Request in once you have the sign-off of two - other developers, or if you do not have permission to do that, you - may request the second reviewer to merge it for you. - -******************** - Testing Guidelines -******************** - -The Python Agent uses `tox `__ for -testing. The repository uses tests in tests/. - -You can run these tests by entering the tests/ directory and then -entering the directory of the tests you want to run. Then, run the -following command: - -``tox -c tox.ini -e [test environment]`` diff --git a/MANIFEST.in b/MANIFEST.in index 0759bce87d..e561b58c79 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include MANIFEST.in -include README.rst +include README.md include LICENSE include THIRD_PARTY_NOTICES.md include newrelic/version.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000000..8959bbef79 --- /dev/null +++ b/README.md @@ -0,0 +1,169 @@ + + + +New Relic Open Source community project banner. + + +# New Relic Python Agent + +The `newrelic` package instruments your application for performance +monitoring and advanced performance analytics with [New +Relic](http://newrelic.com). + +Pinpoint and solve Python application performance issues down to the +line of code. [New Relic +APM](http://newrelic.com/application-monitoring) 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](http://newrelic.com/python) to learn more. + +## Usage + +This package can be installed via pip: + +```bash +pip install newrelic +``` + +(These instructions can also be found online: [Python Agent Quick +Start](https://docs.newrelic.com/docs/agents/python-agent/getting-started/python-agent-quick-start).) + +1. Generate the agent configuration file with your [license + key](https://docs.newrelic.com/docs/accounts-partnerships/accounts/account-setup/license-key). + + ```bash + newrelic-admin generate-config $YOUR_LICENSE_KEY newrelic.ini + ``` + +2. Validate the agent configuration and test the connection to our data + collector service. + + ```bash + 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](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration#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]{.title-ref} environment + variable to the name of the configuration file you created above: + + ```bash + NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program $YOUR_COMMAND_OPTIONS + ``` + + Examples: + + ```bash + 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](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration#manual-integration) + by adding the following lines at the very top of your python WSGI + script file. (This is useful if you\'re using `mod_wsgi`.) + + ``` python + 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](https://rpm.newrelic.com) to see the real time statistics + generated from your application. + +Additional resources may be found here: + +- [New Relic for Python + Documentation](https://docs.newrelic.com/docs/agents/python-agent) +- [New Relic for Python Release + Notes](https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes) + +## 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](https://forum.newrelic.com/s/hubtopic/aAX8W0000008bSoWAI/troubleshooting-frameworks) +steps you through common troubleshooting questions. + +New Relic offers NRDiag, [a client-side diagnostic +utility](https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics) +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 + +- [New Relic + Documentation](https://docs.newrelic.com/docs/agents/python-agent): + Comprehensive guidance for using our platform +- [New Relic + Community](https://discuss.newrelic.com/c/support-products-agents/python-agent): + The best place to engage in troubleshooting questions +- [New Relic Developer](https://developer.newrelic.com/): Resources + for building a custom observability applications +- [New Relic University](https://learn.newrelic.com/): + A range of online training for New Relic users of every level +- [New Relic Technical Support](https://support.newrelic.com/) + 24/7/365 ticketed support. Read more about our [Technical Support + Offerings](https://docs.newrelic.com/docs/licenses/license-information/general-usage-licenses/support-plan). + +## 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](https://newrelic.com/termsandconditions/privacy) for more +information. + +## Contribute + +We encourage your contributions to improve the New Relic Python Agent! 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 . + +### A note about vulnerabilities + +As noted in our [security policy](https://github.com/newrelic/newrelic-python-agent/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 [our bug bounty program](https://docs.newrelic.com/docs/security/security-privacy/information-security/report-security-vulnerabilities/). + +If you would like to contribute to this project, review [these guidelines](./CONTRIBUTING.md). + +To all contributors, we thank you! Without your contribution, this project would not be what it is today. We also host a community project page dedicated to the [New Relic Python Agent](https://opensource.newrelic.com/projects/newrelic/newrelic-python-agent). + +## License +The New Relic Python Agent is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) 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. diff --git a/README.rst b/README.rst deleted file mode 100644 index 59d5e2c8a8..0000000000 --- a/README.rst +++ /dev/null @@ -1,141 +0,0 @@ -|header| - -.. |header| image:: https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png - :target: https://opensource.newrelic.com/oss-category/#community-plus - -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. - -.. _New Relic: http://newrelic.com -.. _New Relic APM: http://newrelic.com/application-monitoring -.. _Python Application Performance Monitoring with New Relic: http://newrelic.com/python - -Usage ------ - -This package can be installed via pip: - -.. code:: bash - - $ pip install newrelic - - -(These instructions can also be found online: `Python Agent Quick Start`_.) - -1. Generate the agent configuration file with your `license key`_. - - .. code:: bash - - $ newrelic-admin generate-config $YOUR_LICENSE_KEY newrelic.ini - -2. Validate the agent configuration and test the connection to our data collector service. - - .. code:: bash - - $ 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: - - .. code:: bash - - $ NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program $YOUR_COMMAND_OPTIONS - - Examples: - - .. code:: bash - - $ 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``.) - - .. code:: python - - 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. - -.. _Python Agent Quick Start: https://docs.newrelic.com/docs/agents/python-agent/getting-started/python-agent-quick-start -.. _license key: https://docs.newrelic.com/docs/accounts-partnerships/accounts/account-setup/license-key -.. _wrapper script: https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration#wrapper-script -.. _manually integrate the agent: https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration#manual-integration -.. _New Relic UI: https://rpm.newrelic.com - -Additional resources may be found here: - -* `New Relic for Python Documentation `_ -* `New Relic for Python Release Notes `_ - -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 -^^^^^^^^^^^^^^^^ - -* `New Relic Documentation `_: Comprehensive guidance for using our platform -* `New Relic Community `_: The best place to engage in troubleshooting questions -* `New Relic Developer `_: Resources for building a custom observability applications -* `New Relic University `_: A range of online training for New Relic users of every level -* `New Relic Technical Support `_ 24/7/365 ticketed support. Read more about our `Technical Support Offerings `_. - -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 <./ROADMAP.md>`_, 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 `our bug bounty program `_. - -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. diff --git a/ROADMAP.md b/ROADMAP.md deleted file mode 100644 index b291887f8f..0000000000 --- a/ROADMAP.md +++ /dev/null @@ -1,24 +0,0 @@ -# Python Agent Roadmap - -## Product Vision -The goal of the Python agent is to provide complete visibility into the health of your service. The agent provides metrics about the runtime health of your service and the process it runs in, and traces that show how specific requests are performing. It also provides information about the environment in which it is running, so you can identify issues with specific hosts, regions, deployments, and other facets. - -New Relic is moving toward OpenTelemetry. OpenTelemetry is a unified standard for service instrumentation. You will soon see an updated version of the agent that uses the OpenTelemetry SDK and [auto-]instrumentation as its foundation. OpenTelemetry will include a broad set of high-quality community-contributed instrumentation and a powerful vendor-neutral API for adding your own instrumentation. - - -## Roadmap -### Description -This roadmap project is broken down into the following sections: - -- **Now**: - - This section contains features that are currently in progress. -- **Next**: - - This section contains work planned within the next three months. These features may still be deprioritized and moved to Future. -- **Future**: - - This section is for ideas for future work that is alined with the product vision and possible opportunities for community contribution. It contains a list of features that anyone can implement. No guarantees can be provided on if or when these features will be completed. - - -**The roadmap project is found [here](https://github.com/orgs/newrelic/projects/13)** - -#### Disclaimers -> This roadmap is subject to change at any time. Future items should not be considered commitments. diff --git a/setup.py b/setup.py index 76448d2389..aee241eadd 100644 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def newrelic_agent_next_version(version): if not script_directory: script_directory = os.getcwd() -readme_file = os.path.join(script_directory, "README.rst") +readme_file = os.path.join(script_directory, "README.md") if sys.platform == "win32" and python_version > (2, 6): build_ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError, IOError)