Pluggable Integrations

Pluggable integrations are integrations that can be additionally enabled, to provide specific features. They're documented so you can see what they do and that they can be enabled. To enable pluggable integrations, provide a new instance with your config to the integrations option. For example: integrations: [new Sentry.Integrations.Modules()].



Import name: Sentry.Integrations.CaptureConsole

This integration captures all Console API calls and redirects them to Sentry using captureMessage call. It then retriggers to preserve default native behavior.

Available options:

  levels: string[]; // an array of methods that should be captured, defaults to ['log', 'info', 'warn', 'error', 'debug', 'assert']


Import name: Sentry.Integrations.Dedupe

This integration deduplicates certain events. It can be helpful if you are receiving many duplicate errors. Be aware that we will only compare stack traces and fingerprints.


Import name: Sentry.Integrations.Debug

This integration allows you to quickly inspect the content of the processed event that will be passed to beforeSend and effectively send it to Sentry.

Available options:

  debugger: boolean; // trigger DevTools debugger instead of using console.log
  // stringify event before passing it to console.log
  stringify: boolean;


Import name: Sentry.Integrations.ExtraErrorData

This integration extracts all non-native attributes from the Error object and attaches them to the event as the extra data.

Available options:

  // limit of how deep the object serializer should go. Anything deeper than limit will
  // be replaced with standard Node.js REPL notation of [Object], [Array], [Function] or
  // a primitive value. Defaults to 3.
  depth: number;


Import name: Sentry.Integrations.RewriteFrames

This integration allows you to apply a transformation to each frame of the stack trace. In the streamlined scenario, it can be used to change the name of the file frame it originates from, or it can be fed with an iterated function to apply any arbitrary transformation.

On Windows machines, you have to use Unix paths and skip the volume letter in root option in order to make it work. For example C:\\Program Files\\Apache\\www won't work, however, /Program Files/Apache/www will.

import * as Sentry from "@sentry/browser";
import { RewriteFrames as RewriteFramesIntegration } from "@sentry/integrations";

  dsn: "",
  integrations: [new RewriteFramesIntegration(
      // root path that will be stripped from the current frame's filename by the default iteratee if the filename is an absolute path
      root: string;

      // a custom prefix that will be used by the default iteratee (default: `app://`)
      prefix: string;

      // function that takes the frame, applies a transformation, and returns it
      iteratee: (frame) => frame;

Usage Examples

For example, if the full path to your file is /www/src/app/file.js:

UsagePath in Stack TraceDescription
RewriteFrames()app:///file.jsThe default behavior is to replace the absolute path, except the filename, and prefix it with the default prefix (app:///).
RewriteFrames({prefix: 'foo/'})foo/file.jsPrefix foo/ is used instead of the default prefix app:///.
RewriteFrames({root: '/www'})app:///src/app/file.jsroot is defined as /www, so only that part is trimmed from beginning of the path.

Node specific


Import name: Sentry.Integrations.Modules

This integration fetches names of all currently installed Node modules and attaches the list to the event. Once fetched, Sentry will cache the list for later reuse.


Import name: Sentry.Integrations.Transaction

This integration tries to extract useful transaction names that will be used to distinguish the event from the rest. It walks through all stack trace frames and reads the first in-app frame's module and function name.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").