Skip to content

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

Merged
merged 1 commit into from
Sep 1, 2023
Merged

fix(node): Improve mysql integration #8923

merged 1 commit into from
Sep 1, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Aug 31, 2023

  1. Make sure it works consistently when not calling connection.connect() (which is optional) - 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.

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.
@mydea mydea requested a review from AbhiPrasad August 31, 2023 12:06
@mydea mydea self-assigned this Aug 31, 2023
});

const connection = mysql.createConnection({
user: 'root',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "root" is used as [user name](1).

const connection = mysql.createConnection({
user: 'root',
password: 'docker',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "docker" is used as [password](1).
});

const connection = mysql.createConnection({
user: 'root',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "root" is used as [user name](1).

const connection = mysql.createConnection({
user: 'root',
password: 'docker',

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "docker" is used as [password](1).
@@ -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',
Copy link
Member

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? 😅

Copy link
Member Author

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

@mydea mydea merged commit 1ca67d1 into develop Sep 1, 2023
@mydea mydea deleted the fn/node-mysql branch September 1, 2023 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants