Skip to content

MySQL tracing integration breaks non-callback queries #9207

Closed
@chriswiggins

Description

@chriswiggins

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

7.73.0

Framework Version

node 18

Link to Sentry event

No response

SDK Setup

sentry.init({
  dsn: 'https://[email protected]/11111',
  debug: true,
  enabled: true,
  environment: '123',
  release: '111',
  serverName: '111',
  tracesSampleRate: 0
});

Steps to Reproduce

We use the node mysql library with streams. This doesn't require a callback being passed to the query function.

We just updated the packages of one of our services, which has bought in an update to sentry and the tracing modules, but this completely broke our deployment.

The last version we were on was 7.40.0 where the following code snippet works. This doesn't work on the latest release.

const sentry = require('@sentry/node');
require('@sentry/tracing');

const { createPool } = require('mysql');

sentry.init({
  dsn: 'https://[email protected]/11111',
  debug: true,
  enabled: true,
  environment: '123',
  release: '111',
  serverName: '111',
  tracesSampleRate: 0
});


const mysql = createPool({
  connectionLimit: 10,
  database: 'user',
  host: 'localhost',
  password: 'user',
  user: 'user'
});

const query = mysql.query('SELECT * from user');
query.on('result', console.log);  

You can get the above code snippet to produce rows from the query by setting enabled: false or not requiring the @sentry/tracing plugin

Expected Result

See above

Actual Result

See above

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: nodeIssues related to the Sentry Node SDK

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions