mysql2 (OpenTelemetry)
The AppSignal for Node.js integration with OpenTelemetry for MySQL, through the mysql2
package.
Installation
First follow the OpenTelemetry installation instructions.
In the tracing.js
file, add the OpenTelemetry MySQL2Instrumentation to the list of instrumentations.
// tracing.js
// The start of the tracing.js file, see the installation instructions
// Add the MySQLInstrumentation import
const { MySQLInstrumentation } = require('@opentelemetry/instrumentation-mysql');
const sdk = new opentelemetry.NodeSDK({
instrumentations: [
// Other instrumention here
// Add the MySQLInstrumentation
new MySQLInstrumentation()
]
});
// The rest of the tracing.js file, see the installation instructions