Documentation navigation

mysql (OpenTelemetry)

The AppSignal for Node.js integration with OpenTelemetry for MySQL, through the mysql package.

Installation

First follow the OpenTelemetry installation instructions.

In the tracing.js file, add the OpenTelemetry MySQLInstrumentation 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 { MySQL2Instrumentation } = require('@opentelemetry/instrumentation-mysql2');

const sdk = new opentelemetry.NodeSDK({
  instrumentations: [
    // Other instrumention here

    // Add the MySQL2Instrumentation
    MySQL2Instrumentation
  ]
});

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

We'd like to set cookies, read why.