-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(node): Improve mysql integration #8923
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
Conversation
1. Make sure it works consistently when not calling `connection.connect()` - it used to only register the mysql config on the second call, as it calls `connect` under the hood but only after we already tried to fetch it again. 2. Make sure it works without a callback.
}); | ||
|
||
const connection = mysql.createConnection({ | ||
user: 'root', |
Check failure
Code scanning / CodeQL
Hard-coded credentials
|
||
const connection = mysql.createConnection({ | ||
user: 'root', | ||
password: 'docker', |
Check failure
Code scanning / CodeQL
Hard-coded credentials
}); | ||
|
||
const connection = mysql.createConnection({ | ||
user: 'root', |
Check failure
Code scanning / CodeQL
Hard-coded credentials
|
||
const connection = mysql.createConnection({ | ||
user: 'root', | ||
password: 'docker', |
Check failure
Code scanning / CodeQL
Hard-coded credentials
@@ -14,6 +14,9 @@ test('should auto-instrument `mysql` package.', async () => { | |||
op: 'db', | |||
data: { | |||
'db.system': 'mysql', | |||
'server.address': 'localhost', | |||
'server.port': 3306, | |||
'db.user': 'root', |
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.
just to sanity-check (becaus afaict assertSentryTransaction
doesn't require strict equality): We don't collect something like db.password
, rigth? 😅
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.
nope, we do not :D
connection.connect()
(which is optional) - it used to only register the mysql config on the second call, as it callsconnect
under the hood but only after we already tried to fetch it again.