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.

// 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
    new MySQL2Instrumentation()
  ]
});
 
// The rest of the tracing.js file, see the installation instructions

Want to help us improve this documentation page?

Create a pull request

Need more help?

Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.

Contact us

Start a trial - 30 days free

AppSignal is a great way to monitor your Ruby, Elixir & Node.js applications. Works great with Rails, Phoenix, Express and other frameworks, with support for background jobs too. Let's improve your apps together.

Start a trial