
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
aws-xray-sdk-mysql
Advanced tools
The AWS X-Ray MySQL package automatically records query information and request and
response data. Simply patch the MySQL package via captureMySQL as shown below.
The AWS X-Ray SDK Core has two modes - manual and automatic.
Automatic mode uses the cls-hooked package and automatically
tracks the current segment and subsegment. This is the default mode.
Manual mode requires that you pass around the segment reference. See the examples below.
MYSQL_DATABASE_VERSION Sets additional data for the sql subsegment.
MYSQL_DRIVER_VERSION Sets additional data for the sql subsegment.
var AWSXRay = require('aws-xray-sdk');
var pg = AWSXRay.captureMySQL(require('mysql'));
...
exports.handler = function (event, context, callback) {
// Make MySQL queries normally
}
var AWSXRay = require('aws-xray-sdk-core');
var captureMySQL = require('aws-xray-sdk-mysql');
var mysql = captureMySQL(require('mysql'));
var config = { ... };
...
var connection = mysql.createConnection(config);
connection.query('SELECT * FROM cats', function(err, rows) {
//Automatically captures query information and errors (if any)
});
...
var pool = mysql.createPool(config);
pool.query('SELECT * FROM cats', function(err, rows, fields) {
//Automatically captures query information and errors (if any)
}
var AWSXRay = require('aws-xray-sdk-core');
var captureMySQL = require('aws-xray-sdk-mysql');
var mysql = captureMySQL(require('mysql'));
var config = { ... };
...
var connection = mysql.createConnection(config);
connection.query('SELECT * FROM cats', function(err, rows) {
//Automatically captures query information and errors (if any)
}, segment);
...
var pool = mysql.createPool(config);
pool.query('SELECT * FROM cats', function(err, rows, fields) {
//Automatically captures query information and errors (if any)
}, segment);
FAQs
AWS X-Ray Patcher for MySQL (Javascript)
The npm package aws-xray-sdk-mysql receives a total of 278,230 weekly downloads. As such, aws-xray-sdk-mysql popularity was classified as popular.
We found that aws-xray-sdk-mysql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 24 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.