# opentelemetry-plugin-sequelize

> open telemetry instrumentation for the `sequelize` module

Latest version **0.2.0** (published 2021-01-28) · Apache-2.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install opentelemetry-plugin-sequelize
pnpm add opentelemetry-plugin-sequelize
yarn add opentelemetry-plugin-sequelize
bun add opentelemetry-plugin-sequelize
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2021-01-28 |
| First published | 2020-11-03 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 64.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 168 |
| Author | Aspecto |
| Maintainers | aspecto-release-bot |
| Keywords | sequelize, opentelemetry |

## Links

- npm: https://www.npmjs.com/package/opentelemetry-plugin-sequelize
- Repository: https://github.com/aspecto-io/opentelemetry-ext-js
- Issues: https://github.com/aspecto-io/opentelemetry-ext-js/issues
- npm.io page: https://npm.io/package/opentelemetry-plugin-sequelize

## Dependencies (4)

- [shimmer](https://npm.io/package/shimmer.md) ^1.2.1
- [@opentelemetry/api](https://npm.io/package/@opentelemetry/api.md) ^0.15.0
- [@opentelemetry/core](https://npm.io/package/@opentelemetry/core.md) ^0.15.0
- [@opentelemetry/semantic-conventions](https://npm.io/package/@opentelemetry/semantic-conventions.md) ^0.15.0

## Recent versions

- 0.2.0 (latest) — 2021-01-28
- 0.2.0-dev.0 (dev) — 2021-01-27
- 0.1.2-alpha.0 (alpha) — 2021-01-06
- 0.1.2 — 2021-01-12
- 0.1.1 — 2020-12-23
- 0.1.0 — 2020-12-16
- 0.1.0-alpha.0 — 2020-12-10
- 0.0.1 — 2020-11-03

## README

# OpenTelemetry Sequelize Instrumentation for Node.js
[![NPM version](https://img.shields.io/npm/v/opentelemetry-plugin-sequelize.svg)](https://www.npmjs.com/package/opentelemetry-plugin-sequelize)

This module provides automatic instrumentation for [`Sequelize`](https://sequelize.org/).  
> _Tested and worked on versions v4, v5 and v6 of Sequelize._

## Installation

```
npm install --save opentelemetry-plugin-sequelize
```

## Usage

To load a specific plugin (**sequelize** in this case), specify it in the Node Tracer's configuration

```js
const { NodeTracerProvider } = require("@opentelemetry/node");

const provider = new NodeTracerProvider({
  plugins: {
    sequelize: {
      enabled: true,
      // You may use a package name or absolute path to the file.
      path: "opentelemetry-plugin-sequelize",
    },
  },
});
```

### Sequelize Plugin Options

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

| Options        | Type                                   | Description                                                                                     |
| -------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `responseHook` | `SequelizeResponseCustomAttributesFunction` | Hook called before response is returned, which allows to add custom attributes to span.      |
| `ignoreOrphanedSpans` | `boolean` | Set to true if you only want to trace operation which has parent spans |

---

This extension (and many others) was developed by [Aspecto](https://www.aspecto.io/) with ❤️

---
_Source: https://npm.io/package/opentelemetry-plugin-sequelize · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
