
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
@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 25 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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.