-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(instrumentation-mysql2): instrument connection on 3.11.5 #2579
fix(instrumentation-mysql2): instrument connection on 3.11.5 #2579
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2579 +/- ##
==========================================
- Coverage 90.75% 90.75% -0.01%
==========================================
Files 169 169
Lines 8018 8026 +8
Branches 1632 1635 +3
==========================================
+ Hits 7277 7284 +7
- Misses 741 742 +1
|
|
||
// [email protected] included a refactoring, where most code was moved out of the `Connection` class and into a shared base | ||
// so we need to instrument that instead, see https://github.com/sidorares/node-mysql2/pull/3081 | ||
if (basePrototype?.constructor?.name === 'BaseConnection') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reminds me of #2522
What would you think about checking the presence of the functions in the base class' prototype?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea, let's try that, one sec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@david-luna doing that now (see latest commits)
Description:
[email protected]
did include a refactoring that moved some of the functionality we instrument to a base class. This PR adapts to instrumenting the base class instead if one exists and the name of the base is known to us.Fixes #2572