newrelic-python-agent icon indicating copy to clipboard operation
newrelic-python-agent copied to clipboard

Package capture harvest

Open lrafeei opened this issue 1 year ago • 2 comments

This PR aims to alleviate some of the time consumed by package data collection in the connect cycle. Instead of collecting all modules used in the application at startup, the agent uses the fast harvest cycle to incrementally collect this data and sends it though the update_loaded_modules endpoint instead of the connect endpoint (through the "environment" key).

Note: despite the term "Jars" not being used by Python to refer to packages/modules, this is the exact string the endpoint needs in order to process the data.

lrafeei avatar Oct 08 '24 20:10 lrafeei

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON bandit 4 0 5.34s
✅ PYTHON black 6 0 0 1.44s
✅ PYTHON flake8 6 0 0.76s
✅ PYTHON isort 6 0 0 0.34s
✅ PYTHON pylint 6 0 6.02s

See detailed report in MegaLinter reports Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

github-actions[bot] avatar Oct 08 '24 20:10 github-actions[bot]

Codecov Report

Attention: Patch coverage is 72.54902% with 14 lines in your changes missing coverage. Please review.

Project coverage is 81.17%. Comparing base (dacf155) to head (fd3b91c).

Files with missing lines Patch % Lines
newrelic/core/application.py 64.00% 8 Missing and 1 partial :warning:
newrelic/core/environment.py 77.77% 3 Missing and 1 partial :warning:
newrelic/common/agent_http.py 75.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1228      +/-   ##
==========================================
- Coverage   81.34%   81.17%   -0.18%     
==========================================
  Files         200      200              
  Lines       21891    21913      +22     
  Branches     3469     3472       +3     
==========================================
- Hits        17808    17787      -21     
- Misses       2941     2977      +36     
- Partials     1142     1149       +7     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 08 '24 21:10 codecov-commenter