# Integrations | Sentry for Express

The Sentry SDK uses integrations to hook into the functionality of popular libraries to automatically instrument your application and give you the best data out of the box.

Integrations automatically add error instrumentation, performance instrumentation, and/or extra context information to your application. Some are enabled by default, but you can disable them or modify their settings.

### [Integrations](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations.md#integrations)

|                                                                                                                                                  | **Auto Enabled** | **Errors** | **Tracing** | **Additional Context** |
| ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- | ---------- | ----------- | ---------------------- |
| [`amqplibIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/amqplib.md)                         | ✓                |            | ✓           |                        |
| [`anrIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/anr.md)                                 |                  | ✓          |             |                        |
| [`captureConsoleIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/captureconsole.md)           |                  |            |             | ✓                      |
| [`childProcessIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/childProcess.md)               | ✓                |            |             | ✓                      |
| [`consoleIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/console.md)                         | ✓                |            |             | ✓                      |
| [`contextLinesIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/contextlines.md)               | ✓                | ✓          |             |                        |
| [`dataloaderIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/dataloader.md)                   |                  |            | ✓           |                        |
| [`dedupeIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/dedupe.md)                           | ✓                | ✓          |             |                        |
| [`extraErrorDataIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/extraerrordata.md)           |                  |            |             | ✓                      |
| [`fsIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/fs.md)                                   |                  |            | ✓           |                        |
| [`functionToStringIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/functiontostring.md)       | ✓                |            |             |                        |
| [`genericPoolIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/genericpool.md)                 | ✓                |            | ✓           |                        |
| [`graphqlIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/graphql.md)                         | ✓                |            | ✓           |                        |
| [`httpIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/http.md)                               | ✓                | ✓          | ✓           | ✓                      |
| [`inboundFiltersIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/inboundfilters.md)           | ✓                | ✓          |             |                        |
| [`kafkaIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/kafka.md)                             | ✓                |            | ✓           |                        |
| [`knexIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/knex.md)                               |                  |            | ✓           |                        |
| [`linkedErrorsIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/linkederrors.md)               | ✓                | ✓          |             |                        |
| [`localVariablesIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/localvariables.md)           |                  | ✓          |             |                        |
| [`lruMemoizerIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/lrumemoizer.md)                 | ✓                |            | ✓           |                        |
| [`modulesIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/modules.md)                         | ✓                |            |             | ✓                      |
| [`mongoIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/mongo.md)                             | ✓                |            | ✓           |                        |
| [`mongooseIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/mongoose.md)                       | ✓                |            | ✓           |                        |
| [`mysqlIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/mysql.md)                             | ✓                |            | ✓           |                        |
| [`mysql2Integration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/mysql2.md)                           | ✓                |            | ✓           |                        |
| [`nativeNodeFetchIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/nodefetch.md)               | ✓                |            | ✓           | ✓                      |
| [`nodeContextIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/nodecontext.md)                 | ✓                |            |             | ✓                      |
| [`nodeProfilingIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/nodeprofiling.md)             |                  |            | ✓           |                        |
| [`onUncaughtExceptionIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/onuncaughtexception.md) | ✓                | ✓          |             |                        |
| [`onUnhandledRejectionIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/unhandledrejection.md) | ✓                | ✓          |             |                        |
| [`postgresIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/postgres.md)                       | ✓                |            | ✓           |                        |
| [`prismaIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/prisma.md)                           | ✓                |            | ✓           |                        |
| [`redisIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/redis.md)                             | ✓                |            | ✓           |                        |
| [`requestDataIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/requestdata.md)                 | ✓                |            | ✓           |                        |
| [`vercelAiIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/vercelai.md)                       | ✓                |            | ✓           |                        |
| [`rewriteFramesIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/rewriteframes.md)             |                  | ✓          |             |                        |
| [`supabaseIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/supabase.md)                       |                  | ✓          | ✓           |                        |
| [`tediousIntegration`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/tedious.md)                         | ✓                |            | ✓           |                        |
| [`trpcMiddleware`](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/trpc.md)                                |                  | ✓          | ✓           | ✓                      |

## [Modifying Default Integrations](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations.md#modifying-default-integrations)

To disable system integrations, set `defaultIntegrations: false` when calling `init()`.

To override their settings, provide a new instance with your config to the `integrations` option. For example, to turn off browser capturing console calls:

```javascript
Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",

  integrations: [
    Sentry.linkedErrorsIntegration({
      limit: 7,
    }),
  ],
});
```

## [Adding an Integration](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations.md#adding-an-integration)

You can add additional integrations in your `init` call:

```javascript
import * as Sentry from "@sentry/node";

Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  integrations: [],
});

Sentry.addIntegration(Sentry.captureConsoleIntegration());
```

Alternatively, you can add integrations via `Sentry.addIntegration()`. This is useful if you only want to enable an integration in a specific environment or if you want to load an integration later. For all other cases, we recommend you use the `integrations` option.

```javascript
import * as Sentry from "@sentry/node";

Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  integrations: [Sentry.captureConsoleIntegration()],
});
```

## [Removing a Default Integration](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations.md#removing-a-default-integration)

If you only want to remove a single or some of the default integrations, instead of disabling all of them with `defaultIntegrations: false`, you can use the following syntax to filter out the ones you don't want.

This example removes the integration for adding breadcrumbs to the event, which is enabled by default:

```javascript
Sentry.init({
  // ...
  integrations: function (integrations) {
    // integrations will be all default integrations
    return integrations.filter(function (integration) {
      return integration.name !== "Breadcrumbs";
    });
  },
});
```

## [Custom Integrations](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations.md#custom-integrations)

You can also create [custom integrations](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/custom.md).

## [Available Integrations](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations.md#available-integrations)

* #### [Amqplib](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/amqplib.md)

  Adds instrumentation for Amqplib. (default)

* #### [Anr](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/anr.md)

  Capture events when the event loop is blocked and the application is no longer responding.

* #### [CaptureConsole](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/captureconsole.md)

  Captures all Console API calls via \`captureException\` or \`captureMessage\`.

* #### [Child Process Integration](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/childProcess.md)

  Adds instrumentation for child processes and worker threads (default)

* #### [Console](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/console.md)

  Capture console logs as breadcrumbs. (default)

* #### [Context](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/nodecontext.md)

  Capture context about the environment and the device that the client is running on, and add it to events. (default)

* #### [ContextLines](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/contextlines.md)

  Adds source code to your stack frames. (default)

* #### [Dataloader](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/dataloader.md)

  Adds instrumentation for Dataloader.

* #### [Dedupe](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/dedupe.md)

  Deduplicate certain events to avoid receiving duplicate errors. (default)

* #### [ExtraErrorData](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/extraerrordata.md)

  Extracts all non-native attributes from the error object and attaches them to the event as extra data.

* #### [FileSystem](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/fs.md)

  Adds instrumentation for filesystem operations.

* #### [FunctionToString](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/functiontostring.md)

  Allows the SDK to provide original functions and method names, even when those functions or methods are wrapped by our error or breadcrumb handlers. (default)

* #### [Generic Pool](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/genericpool.md)

  Adds instrumentation for Generic Pool. (default)

* #### [GraphQL](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/graphql.md)

  Adds instrumentation for GraphQL. (default)

* #### [Http](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/http.md)

  Capture spans & breadcrumbs for http requests. (default)

* #### [InboundFilters](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/inboundfilters.md)

  Allows you to ignore specific errors based on the type, message, or URLs in a given exception. (default)

* #### [Kafka](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/kafka.md)

  Adds instrumentation for KafkaJS. (default)

* #### [Knex](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/knex.md)

  Adds instrumentation for Knex.

* #### [LinkedErrors](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/linkederrors.md)

  Allows you to configure linked errors. (default)

* #### [LocalVariables](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/localvariables.md)

  Add local variables to exception frames. (default)

* #### [LRU Memoizer](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/lrumemoizer.md)

  Adds instrumentation for LRU Memoizer. (default)

* #### [Modules](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/modules.md)

  Add node modules / packages to the event. (default)

* #### [MongoDB](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/mongo.md)

  Adds instrumentation for MongoDB. (default)

* #### [Mongoose](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/mongoose.md)

  Adds instrumentation for Mongoose. (default)

* #### [MySQL](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/mysql.md)

  Adds instrumentation for MySQL. (default)

* #### [MySQL2](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/mysql2.md)

  Adds instrumentation for MySQL2. (default)

* #### [NodeFetch](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/nodefetch.md)

  Capture spans & breadcrumbs for node fetch requests. (default)

* #### [NodeProfiling](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/nodeprofiling.md)

  Capture profiling data for Node.js applications.

* #### [OnUncaughtException](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/onuncaughtexception.md)

  Registers handlers to capture global uncaught exceptions. (default)

* #### [OnUnhandledRejection](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/unhandledrejection.md)

  Registers handlers to capture global unhandled promise rejections. (default)

* #### [Postgres](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/postgres.md)

  Adds instrumentation for Postgres. (default)

* #### [Prisma](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/prisma.md)

  Adds instrumentation for Prisma.

* #### [Redis](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/redis.md)

  Adds instrumentation for Redis. (default)

* #### [RequestData](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/requestdata.md)

  Adds data about an incoming request to an event. (default)

* #### [RewriteFrames](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/rewriteframes.md)

  Allows you to apply a transformation to each frame of the stack trace.

* #### [Supabase](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/supabase.md)

  Adds instrumentation for Supabase client operations.

* #### [Tedious](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/tedious.md)

  Adds instrumentation for Tedious. (default)

* #### [trpcMiddleware](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/trpc.md)

  Capture spans & errors for tRPC handlers.

* #### [Vercel AI](https://docs.sentry.io/platforms/javascript/guides/express/configuration/integrations/vercelai.md)

  Adds instrumentation for Vercel AI SDK.
