newrelic / newrelic-python-agent

New Relic Python Agent
https://docs.newrelic.com/docs/agents/python-agent
Apache License 2.0
176 stars 99 forks source link

Capture memcache host & port #1194

Closed hmstepanek closed 1 week ago

hmstepanek commented 1 month ago

Overview

Capture host & port to create AWS entity metric on bmemcached, aiomcache, and pymemcache libraries. Do not capture host and port info for no longer supported libraries umemcached (doesn't support Python3).

github-actions[bot] commented 1 month ago

🦙 MegaLinter status: ❌ ERROR

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON bandit 3 0 4.6s
✅ PYTHON black 6 0 0 0.79s
❌ PYTHON flake8 6 1 0.43s
✅ PYTHON isort 6 0 0 0.23s
✅ PYTHON pylint 6 0 2.04s

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_

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 60.00000% with 10 lines in your changes missing coverage. Please review.

Project coverage is 81.44%. Comparing base (2d6525e) to head (c201bf1).

Files with missing lines Patch % Lines
newrelic/hooks/datastore_bmemcached.py 45.45% 0 Missing and 6 partials :warning:
newrelic/hooks/datastore_aiomcache.py 71.42% 0 Missing and 2 partials :warning:
newrelic/hooks/datastore_pymemcache.py 71.42% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1194 +/- ## ========================================== - Coverage 81.60% 81.44% -0.16% ========================================== Files 197 197 Lines 21803 21825 +22 Branches 3807 3817 +10 ========================================== - Hits 17792 17776 -16 - Misses 2897 2931 +34 - Partials 1114 1118 +4 ```

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

jairhenrique commented 3 weeks ago

It would be nice to add this information to the aiomcache database store as well.

hmstepanek commented 3 weeks ago

It would be nice to add this information to the aiomcache database store as well.

I have chosen not to do this since aiomcache has not been updated since 2014. It appears to be dead. It also does not support past Python 3.4 (we only officially support down to Python 3.7 right now). If it is updated at some point in the future then we can do this at that time. Right now I don't see that it's worth the effort.

jairhenrique commented 3 weeks ago

I have chosen not to do this since aiomcache has not been updated since 2014. It appears to be dead. It also does not support past Python 3.4 (we only officially support down to Python 3.7 right now). If it is updated at some point in the future then we can do this at that time. Right now I don't see that it's worth the effort.

Maybe we are not talking about the same project. The latest version of aiomcache was released in May 2024. https://github.com/aio-libs/aiomcache/releases/tag/v0.8.2

I added the instrumentation in this pr.

hmstepanek commented 3 weeks ago

I have chosen not to do this since aiomcache has not been updated since 2014. It appears to be dead. It also does not support past Python 3.4 (we only officially support down to Python 3.7 right now). If it is updated at some point in the future then we can do this at that time. Right now I don't see that it's worth the effort.

Maybe we are not talking about the same project. The latest version of aiomcache was released in May 2024. https://github.com/aio-libs/aiomcache/releases/tag/v0.8.2

I added the instrumentation in this pr.

You're right! We were talking about different libraries! Sorry-yes I will add that in!