-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Meta: Help WantedPackage: nodeIssues related to the Sentry Node SDKIssues related to the Sentry Node SDKhacktoberfest
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
7.65.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
const Sentry = require("@sentry/node");
const { ProfilingIntegration } = require("@sentry/profiling-node");
Sentry.init({
dsn: process.env.SENTRY_DSN,
debug: true,
tracesSampleRate: 1,
profilesSampleRate: 1,
integrations: [
...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations(),
new ProfilingIntegration(),
]
});Steps to Reproduce
An express route like this:
app.get("/test-mysql",async function (req, res) {
const mysql = require('mysql');
const connection = mysql.createConnection({
host: 'localhost',
user: 'root',
database: 'test-app',
password: 'password'
});
const movies = [];
for(let i = 1; i <= 15; i++) {
const rows = await new Promise((resolve, reject) => {
connection.query(
'SELECT * FROM `movies` WHERE `title` = ?',
[`Joker${i}`],
function (error, results, fields) {
if (error) {
return reject(error);
}
resolve(results);
}
);
});
movies.push(...rows);
}
connection.end();
res.send({ movies });
});Expected Result
Should get DB spans.
Actual Result
Does not generate any DB spans.
Sentry Logger [log]: [Tracing] starting http.server transaction - GET /test-mysql
Sentry Logger [log]: [Profiling] started profiling transaction: GET /test-mysql
Sentry Logger [log]: [Profiling] stopped profiling of transaction: GET /test-mysql
Sentry Logger [log]: [Tracing] Finishing http.server transaction: GET /test-mysql.Metadata
Metadata
Assignees
Labels
Meta: Help WantedPackage: nodeIssues related to the Sentry Node SDKIssues related to the Sentry Node SDKhacktoberfest
Projects
Status
Waiting for: Product Owner