
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
@metis-data/sequelize-interceptor
Advanced tools
Intercept sequelize queries using OpenTelemetry and enrich spans
@metis-data/sequelize-interceptorIntercept sequelize queries using OpenTelemetry and enrich spans.
Create a Sequelize instrumentation object using getSequelizeInstrumentation function.
The Sequelize instance passed to this function will NOT be instrumented. It is only used for getting the execution plans from the database.
The rest are optional parameters.
You can switch between Actual and Estimated plans collection using PlanType.
Internal errors can be collected using the errorHandler function.
Plan collection can be disabled using a flag.
import { PlanType } from '@metis-data/base-interceptor';
import { getSequelizeInstrumentation } from '@metis-data/sequelize-interceptor';
// Create the instrumentation object to use with Open Telemetry.
const sequelizeInstrumentation = getSequelizeInstrumentation(
sequelize, // The sequelize instance, not instrumented.
PlanType.ESTIMATED, // the type of plan to get, default to Estimated.
console.error, // error handler, exception are still sent to metis' Sentry account.
true, // Collect plans and add them to spans. default to true.
);
Add the instrumentation to your existing OpenTelemetry setup.
registerInstrumentations({
...
instrumentations: [..., sequelizeInstrumentation],
});
Currently this package can only be used in CommonJS modules, and it will not work with ES modules. The issue stems from the fact that we need to provide a Sequelize instance to the instrumentation. That means we need to import Sequelize, and that causes issues with the patching of Sequelize. To solve this issue we clear the required cache internally when instrument is called.
Typescript can be used, but it needs to target CommonJS.
FAQs
Intercept sequelize queries using OpenTelemetry and enrich spans
The npm package @metis-data/sequelize-interceptor receives a total of 28 weekly downloads. As such, @metis-data/sequelize-interceptor popularity was classified as not popular.
We found that @metis-data/sequelize-interceptor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.