{"id":13708490,"url":"https://github.com/newrelic/newrelic-python-agent","last_synced_at":"2026-01-30T00:21:24.792Z","repository":{"id":37076278,"uuid":"46122460","full_name":"newrelic/newrelic-python-agent","owner":"newrelic","description":"New Relic Python Agent","archived":false,"fork":false,"pushed_at":"2025-10-14T23:32:38.000Z","size":22272,"stargazers_count":197,"open_issues_count":21,"forks_count":127,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-10-15T03:06:56.020Z","etag":null,"topics":["agent","newrelic","python"],"latest_commit_sha":null,"homepage":"https://docs.newrelic.com/docs/agents/python-agent","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/newrelic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-11-13T13:06:40.000Z","updated_at":"2025-10-13T20:55:01.000Z","dependencies_parsed_at":"2023-10-14T15:54:28.475Z","dependency_job_id":"d81db8bb-7e98-4379-ba84-065d91fded89","html_url":"https://github.com/newrelic/newrelic-python-agent","commit_stats":{"total_commits":474,"total_committers":39,"mean_commits":"12.153846153846153","dds":0.5928270042194093,"last_synced_commit":"caef2cc4a3e3ad0033e8ecfafeab1a6c1295c4e4"},"previous_names":[],"tags_count":355,"template":false,"template_full_name":null,"purl":"pkg:github/newrelic/newrelic-python-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newrelic%2Fnewrelic-python-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newrelic%2Fnewrelic-python-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newrelic%2Fnewrelic-python-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newrelic%2Fnewrelic-python-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/newrelic","download_url":"https://codeload.github.com/newrelic/newrelic-python-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newrelic%2Fnewrelic-python-agent/sbom","scorecard":{"id":618129,"data":{"date":"2025-08-11","repo":{"name":"github.com/newrelic/newrelic-python-agent","commit":"02d0071fcc5a9620a1166a9b207c2869bf770a3c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":7.9,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/addlicense.yml:40","Info: jobLevel 'contents' permission set to 'read': .github/workflows/build-ci-image.yml:32","Info: jobLevel 'contents' permission set to 'read': .github/workflows/deploy.yml:149","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/mega-linter.yml:45","Info: topLevel 'contents' permission set to 'read': .github/workflows/addlicense.yml:26","Info: topLevel 'contents' permission set to 'read': .github/workflows/build-ci-image.yml:21","Info: topLevel 'contents' permission set to 'read': .github/workflows/deploy.yml:23","Info: topLevel 'contents' permission set to 'read': .github/workflows/mega-linter.yml:26","Info: topLevel 'contents' permission set to 'read': .github/workflows/tests.yml:28","Info: topLevel 'contents' permission set to 'read': .github/workflows/trivy.yml:25"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/build-ci-image.yml:28"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/newrelic/.github/SECURITY.md:1","Info: Found linked content: github.com/newrelic/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/newrelic/.github/SECURITY.md:1","Info: Found text in security policy: github.com/newrelic/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":5,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Info: 'stale review dismissal' is required to merge on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Info: codeowner review is required on branch 'main'","Warn: 'last push approval' is disabled on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":6,"reason":"dependency not pinned by hash detected -- score normalized to 6","details":["Warn: containerImage not pinned by hash: .devcontainer/Dockerfile:17","Warn: containerImage not pinned by hash: .github/containers/Dockerfile:16: pin your Docker image by updating ubuntu:20.04 to ubuntu:20.04@sha256:8feb4d8ca5354def3d8fce243717141ce31e2c428701f6682bd2fafe15388214","Warn: downloadThenRun not pinned by hash: .github/containers/Dockerfile:107","Warn: pipCommand not pinned by hash: .github/scripts/install_azure_functions_worker.sh:44","Warn: pipCommand not pinned by hash: scripts/azure-prebuild.sh:31","Warn: pipCommand not pinned by hash: scripts/azure-prebuild.sh:32","Warn: pipCommand not pinned by hash: scripts/azure-prebuild.sh:33","Warn: pipCommand not pinned by hash: .github/workflows/deploy.yml:122","Warn: pipCommand not pinned by hash: .github/workflows/deploy.yml:123","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:97","Info:  60 out of  60 GitHub-owned GitHubAction dependencies pinned","Info:  14 out of  14 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   0 out of   7 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2013-22 / GHSA-27x4-j476-jp5f","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T04:31:40.221Z","repository_id":37076278,"created_at":"2025-08-21T04:31:40.221Z","updated_at":"2025-08-21T04:31:40.221Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280325314,"owners_count":26311421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","newrelic","python"],"created_at":"2024-08-02T23:00:24.069Z","updated_at":"2025-10-21T20:07:36.046Z","avatar_url":"https://github.com/newrelic.png","language":"Python","funding_links":[],"categories":["Monitoring"],"sub_categories":["Tools"],"readme":"\u003ca href=\"https://opensource.newrelic.com/oss-category/#community-project\"\u003e\u003cpicture\u003e\n\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/newrelic/opensource-website/raw/main/src/images/categories/dark/Community_Plus.png\"\u003e\n\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png\"\u003e\n\u003cimg alt=\"New Relic Open Source community project banner.\" src=\"https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png\"\u003e\n\u003c/picture\u003e\u003c/a\u003e\n\n# New Relic Python Agent\n\n[![GitHub release](https://img.shields.io/github/v/release/newrelic/newrelic-python-agent?sort=semver)](https://github.com/newrelic/newrelic-python-agent/releases)\n[![image](https://img.shields.io/pypi/v/newrelic.svg)](https://pypi.python.org/pypi/newrelic)\n[![image](https://img.shields.io/pypi/pyversions/newrelic.svg)](https://pypi.python.org/pypi/newrelic)\n[![Tests](https://github.com/newrelic/newrelic-python-agent/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/newrelic/newrelic-python-agent/actions/workflows/tests.yml)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![MegaLinter](https://github.com/newrelic/newrelic-python-agent/actions/workflows/mega-linter.yml/badge.svg?branch=main)](https://github.com/newrelic/newrelic-python-agent/actions/workflows/mega-linter.yml)\n[![codecov](https://codecov.io/gh/newrelic/newrelic-python-agent/branch/main/graph/badge.svg)](https://codecov.io/gh/newrelic/newrelic-python-agent)\n[![Secured with Trivy](https://img.shields.io/badge/Trivy-secured-green)](https://github.com/aquasecurity/trivy)\n\nThe `newrelic` package instruments your application for performance\nmonitoring and advanced performance analytics with [New\nRelic](http://newrelic.com).\n\nPinpoint and solve Python application performance issues down to the\nline of code. [New Relic\nAPM](http://newrelic.com/application-monitoring) is the only tool\nyou\\'ll need to see everything in your Python application, from the end\nuser experience to server monitoring. Trace problems down to slow\ndatabase queries, slow 3rd party APIs and web services, caching layers,\nand more. Monitor your app in a production environment and make sure\nyour app can stand a big spike in traffic by running scalability\nreports.\n\nVisit [Python Application Performance Monitoring with New\nRelic](http://newrelic.com/python) to learn more.\n\n## Usage\n\nThis package can be installed via pip:\n\n```bash\npip install newrelic\n```\n\n(These instructions can also be found online: [Python Agent Installation Guide](https://docs.newrelic.com/install/python/).)\n\n1. Generate the agent configuration file with your [license\n    key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/).\n\n    ```bash\n    newrelic-admin generate-config $YOUR_LICENSE_KEY newrelic.ini\n    ```\n\n2. Validate the agent configuration and test the connection to our data\n    collector service.\n\n    ```bash\n    newrelic-admin validate-config newrelic.ini\n    ```\n\n3. Integrate the agent with your web application.\n\n    If you control how your web application or WSGI server is started,\n    the recommended way to integrate the agent is to use the\n    `newrelic-admin` [wrapper\n    script](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration#wrapper-script).\n    Modify the existing startup script, prefixing the existing startup\n    command and options with `newrelic-admin run-program`.\n\n    Also, set the **NEW_RELIC_CONFIG_FILE** environment\n    variable to the name of the configuration file you created above:\n\n    ```bash\n    NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program $YOUR_COMMAND_OPTIONS\n    ```\n\n    Examples:\n\n    ```bash\n    NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -c config.py test_site.wsgi\n\n    $ NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program uwsgi uwsgi_config.ini\n    ```\n\n    Alternatively, you can also [manually integrate the\n    agent](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration#manual-integration)\n    by adding the following lines at the very top of your python WSGI\n    script file. (This is useful if you\\'re using `mod_wsgi`.)\n\n    ``` python\n    import newrelic.agent\n    newrelic.agent.initialize('/path/to/newrelic.ini')\n    ```\n\n4. Start or restart your Python web application or WSGI server.\n\n5. Done! Check your application in the [New Relic\n    UI](https://rpm.newrelic.com) to see the real time statistics\n    generated from your application.\n\nAdditional resources may be found here:\n\n- [New Relic for Python\n    Documentation](https://docs.newrelic.com/docs/agents/python-agent)\n- [New Relic for Python Release\n    Notes](https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes)\n\n## Support\n\nShould you need assistance with New Relic products, you are in good\nhands with several support diagnostic tools and support channels.\n\nThis [troubleshooting\nframework](https://forum.newrelic.com/s/hubtopic/aAX8W0000008bSoWAI/troubleshooting-frameworks)\nsteps you through common troubleshooting questions.\n\nNew Relic offers NRDiag, [a client-side diagnostic\nutility](https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics)\nthat automatically detects common problems with New Relic agents. If\nNRDiag detects a problem, it suggests troubleshooting steps. NRDiag can\nalso automatically attach troubleshooting data to a New Relic Support\nticket.\n\nIf the issue has been confirmed as a bug or is a Feature request, please\nfile a Github issue.\n\n### Support Channels\n\n- [New Relic\n    Documentation](https://docs.newrelic.com/docs/agents/python-agent):\n    Comprehensive guidance for using our platform\n- [New Relic\n    Community](https://discuss.newrelic.com/c/support-products-agents/python-agent):\n    The best place to engage in troubleshooting questions\n- [New Relic Developer](https://developer.newrelic.com/): Resources\n    for building a custom observability applications\n- [New Relic University](https://learn.newrelic.com/): \u003c!-- markdown-link-check-disable-line --\u003e\n    A range of online training for New Relic users of every level\n- [New Relic Technical Support](https://support.newrelic.com/)\n    24/7/365 ticketed support. Read more about our [Technical Support\n    Offerings](https://docs.newrelic.com/docs/licenses/license-information/general-usage-licenses/support-plan).\n\n## Privacy\n\nAt New Relic we take your privacy and the security of your information\nseriously, and are committed to protecting your information. We must\nemphasize the importance of not sharing personal data in public forums,\nand ask all users to scrub logs and diagnostic information for sensitive\ninformation, whether personal, proprietary, or otherwise.\n\nWe define \"Personal Data\" as any information relating to an identified\nor identifiable individual, including, for example, your name, phone\nnumber, post code or zip code, Device ID, IP address and email address.\n\nPlease review [New Relic's General Data Privacy\nNotice](https://newrelic.com/termsandconditions/privacy) for more\ninformation.\n\n## Contribute\n\nWe 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.\n\nIf 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 \u003copensource@newrelic.com\u003e.\n\n### A note about vulnerabilities\n\nAs 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.\n\nIf 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/).\n\nIf you would like to contribute to this project, review [these guidelines](./CONTRIBUTING.md).\n\nTo 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).\n\n## License\nThe New Relic Python Agent is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License. The New Relic\nPython Agent also uses source code from third-party libraries. You can\nfind full details on which libraries are used and the terms under which\nthey are licensed in the third-party notices document.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewrelic%2Fnewrelic-python-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnewrelic%2Fnewrelic-python-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewrelic%2Fnewrelic-python-agent/lists"}