Documentation navigation

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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
    MySQLInstrumentation
  ]
});

// The rest of the tracing.js file, see the installation instructions

We'd like to set cookies, read why.