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

Change to using auto bind on openai base client #1189

Closed hmstepanek closed 1 month ago

hmstepanek commented 1 month ago

Overview

Openai added a new argument which broke our openai instrumentation. In particular it broke our base client arg binding. Change to using auto detection of function signature using bind args.

github-actions[bot] commented 1 month ago

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON bandit 1 0 4.99s
✅ PYTHON black 1 0 0 1.08s
✅ PYTHON flake8 1 0 0.56s
✅ PYTHON isort 1 0 0 0.21s
✅ PYTHON pylint 1 0 3.9s

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

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.26%. Comparing base (60fe0b6) to head (1fa0688).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1189 +/- ## ========================================== - Coverage 81.27% 81.26% -0.01% ========================================== Files 196 196 Lines 21736 21735 -1 Branches 3795 3795 ========================================== - Hits 17666 17664 -2 Misses 2970 2970 - Partials 1100 1101 +1 ```

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

nimdraugsael commented 1 month ago

@hmstepanek thank you so much for fixing that! that also broke our production when we tried to bump openai-client and I was so happy to find that you fixed it already. Kudos!