Skip to content

test(node): Add mysql auto instrumentation tests for @sentry/node-experimental #10255

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 2 commits into from
Jan 18, 2024

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Jan 18, 2024

This PR adds auto instrumentation tests for mysql for @sentry/node-experimental.

There are no ESM tests because mysql does not support ESM!

@timfish timfish changed the title test(node): Add 'mysql auto instrumentation tests for @sentry/node-experimental` test(node): Add mysql auto instrumentation tests for @sentry/node-experimental Jan 18, 2024
const mysql = require('mysql');

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 mysql = require('mysql');

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 mysql = require('mysql');

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).
@timfish timfish marked this pull request as ready for review January 18, 2024 18:39
@AbhiPrasad AbhiPrasad merged commit a380b93 into getsentry:develop Jan 18, 2024
@timfish timfish deleted the test/otel-mysql branch January 18, 2024 19:38
@mydea
Copy link
Member

mydea commented Jan 19, 2024

There are no ESM tests because mysql does not support ESM!

We should try to contribute upstream to make this work 😬 Do you have any clue why it doesn't work with ESM? Maybe it is similar to what I had to do for fastify to make it work with ESM: open-telemetry/opentelemetry-js-contrib#1624

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