0.41.0 • Published 6 months ago

opentelemetry-instrumentation-sequelize v0.41.0

Weekly downloads
186
License
Apache-2.0
Repository
github
Last release
6 months ago

OpenTelemetry Sequelize Instrumentation for Node.js

NPM version

This module provides automatic instrumentation for Sequelize.

Tested and worked on versions v4, v5 and v6 of Sequelize.

Installation

npm install --save opentelemetry-instrumentation-sequelize

Usage

For further automatic instrumentation instruction see the @opentelemetry/instrumentation package.

const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const { SequelizeInstrumentation } = require('opentelemetry-instrumentation-sequelize');

const tracerProvider = new NodeTracerProvider({
  // be sure to disable old plugin
  plugins: {
    sequelize: { enabled: false, path: 'opentelemetry-plugin-sequelize' }
  }
});

registerInstrumentations({
  tracerProvider,
  instrumentations: [
    new SequelizeInstrumentation({
      // see under for available configuration
    })
  ]
});

Sequelize Instrumentation Options

Sequelize instrumentation has few options available to choose from. You can set the following:

OptionsTypeDescription
queryHookSequelizeQueryHookHook called before query is run, which allows to add custom attributes to span.
responseHookSequelizeResponseCustomAttributesFunctionHook called before response is returned, which allows to add custom attributes to span.
ignoreOrphanedSpansbooleanSet to true if you only want to trace operation which has parent spans
moduleVersionAttributeNamestringIf passed, a span attribute will be added to all spans with key of the provided moduleVersionAttributeName and value of the patched module version
suppressInternalInstrumentationbooleanSequelize operation use db libs under the hood. Setting this to true will hide the underlying spans (if instrumented).

Semantic Behavior

Internal implementation queries generated on startup from connection-manager are not instrumented.


This extension (and many others) was developed by Aspecto with ❤️

0.41.0

6 months ago

0.40.0

1 year ago

0.39.1

1 year ago

0.35.1

1 year ago

0.35.0

2 years ago

0.34.0

2 years ago

0.32.0

2 years ago

0.29.0

2 years ago

0.28.0

2 years ago

0.27.1

3 years ago

0.27.0

3 years ago

0.26.1

3 years ago

0.26.0

3 years ago

0.25.0

3 years ago

0.24.1

3 years ago

0.24.0

3 years ago

0.23.0

3 years ago

0.22.1

3 years ago

0.22.0

3 years ago

0.21.1

3 years ago

0.21.0

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.4.4

3 years ago

0.5.0

3 years ago

0.4.3

3 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.4.2

4 years ago

0.3.0

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.1.0

4 years ago

0.2.0

4 years ago

0.0.1

4 years ago