# Integrations | Sentry for SolidStart

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.

The SolidStart SDK initializes the SDK in two runtimes: Browser and Node.js. However, it's important to note that not all integrations are compatible with all of these runtimes.

Depending on whether an integration enhances the functionality of a particular runtime, such as the `BrowserTracing` integration for the browser runtime or the `RequestData` integration for the Node.js runtime, you can only include these integrations in their respective configuration files:

* For the browser runtime integrations, add integrations to `Sentry.init` in `entry..client.config.(js|ts)`
* For the Node.js runtime integrations, add integrations to `Sentry.init` in `instrument.server.mjs`

### [Common Integrations](https://docs.sentry.io/.md#common-integrations)

|                                                                             | **Auto Enabled** | **Errors** | **Tracing** | **Additional Context** |
| --------------------------------------------------------------------------- | ---------------- | ---------- | ----------- | ---------------------- |
| [`dedupeIntegration`](https://docs.sentry.io/dedupe.md)                     | ✓                | ✓          |             |                        |
| [`functionToStringIntegration`](https://docs.sentry.io/functiontostring.md) | ✓                |            |             |                        |
| [`inboundFiltersIntegration`](https://docs.sentry.io/inboundfilters.md)     | ✓                | ✓          |             |                        |
| [`linkedErrorsIntegration`](https://docs.sentry.io/linkederrors.md)         | ✓                | ✓          |             |                        |
| [`captureConsoleIntegration`](https://docs.sentry.io/captureconsole.md)     |                  |            |             | ✓                      |
| [`extraErrorDataIntegration`](https://docs.sentry.io/extraerrordata.md)     |                  |            |             | ✓                      |
| [`rewriteFramesIntegration`](https://docs.sentry.io/rewriteframes.md)       |                  | ✓          |             |                        |

### [Browser Integrations](https://docs.sentry.io/.md#browser-integrations)

|                                                                               | **Auto Enabled** | **Errors** | **Tracing** | **Replay** | **Additional Context** |
| ----------------------------------------------------------------------------- | ---------------- | ---------- | ----------- | ---------- | ---------------------- |
| [`breadcrumbsIntegration`](https://docs.sentry.io/breadcrumbs.md)             | ✓                |            |             |            | ✓                      |
| [`browserApiErrorsIntegration`](https://docs.sentry.io/browserapierrors.md)   | ✓                | ✓          |             |            |                        |
| [`browserSessionIntegration`](https://docs.sentry.io/browsersession.md)       | ✓                |            |             |            | ✓                      |
| [`browserTracingIntegration`](https://docs.sentry.io/browsertracing.md)       | ✓                |            | ✓           |            | ✓                      |
| [`globalHandlersIntegration`](https://docs.sentry.io/globalhandlers.md)       | ✓                | ✓          |             |            |                        |
| [`httpContextIntegration`](https://docs.sentry.io/httpcontext.md)             | ✓                |            |             |            | ✓                      |
| [`browserProfilingIntegration`](https://docs.sentry.io/browserprofiling.md)   |                  |            | ✓           |            |                        |
| [`contextLinesIntegration`](https://docs.sentry.io/contextlines.md)           |                  | ✓          |             |            |                        |
| [`featureFlagsIntegration`](https://docs.sentry.io/featureflags.md)           |                  |            |             |            | ✓                      |
| [`graphqlClientIntegration`](https://docs.sentry.io/graphqlclient.md)         |                  |            |             |            | ✓                      |
| [`httpClientIntegration`](https://docs.sentry.io/httpclient.md)               |                  | ✓          |             |            |                        |
| [`launchDarklyIntegration`](https://docs.sentry.io/launchdarkly.md)           |                  |            |             |            | ✓                      |
| [`moduleMetadataIntegration`](https://docs.sentry.io/modulemetadata.md)       |                  |            |             |            | ✓                      |
| [`openFeatureIntegration`](https://docs.sentry.io/openfeature.md)             |                  |            |             |            | ✓                      |
| [`replayCanvasIntegration`](https://docs.sentry.io/replaycanvas.md)           |                  |            |             | ✓          |                        |
| [`replayIntegration`](https://docs.sentry.io/replay.md)                       |                  |            |             | ✓          | ✓                      |
| [`reportingObserverIntegration`](https://docs.sentry.io/reportingobserver.md) |                  | ✓          |             |            |                        |
| [`statsigIntegration`](https://docs.sentry.io/statsig.md)                     |                  |            |             |            | ✓                      |
| [`supabaseIntegration`](https://docs.sentry.io/supabase.md)                   |                  | ✓          | ✓           |            |                        |
| [`unleashIntegration`](https://docs.sentry.io/unleash.md)                     |                  |            |             |            | ✓                      |

### [Node.js Integrations](https://docs.sentry.io/.md#nodejs-integrations)

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

## [Modifying Default Integrations](https://docs.sentry.io/.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/.md#adding-an-integration)

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

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

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

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/browser";

Sentry.init({
  integrations: [],
});

Sentry.addIntegration(Sentry.reportingObserverIntegration());
```

## [Lazy Loading Integrations](https://docs.sentry.io/.md#lazy-loading-integrations)

Lazy-loading lets you add pluggable integrations without increasing the initial bundle size. You can do this in two ways:

### [1. Dynamic Import (recommended)](https://docs.sentry.io/.md#1-dynamic-import-recommended)

You can add the integration with a dynamic import using `import()`. This method loads the integration from the npm package. To avoid running into issues with `import()`, you should use a bundler that supports dynamic imports. If you're using a tool like Vite for your project, the bundling process is probably already set up.

```javascript
Sentry.init({
  // Note, Replay is NOT instantiated below:
  integrations: [],
});

// Sometime later
import("@sentry/browser").then((lazyLoadedSentry) => {
  Sentry.addIntegration(lazyLoadedSentry.replayIntegration());
});
```

### [2. Load from CDN with `lazyLoadIntegration()`](https://docs.sentry.io/.md#2-load-from-cdn-with-lazyloadintegration)

You can also lazy-load pluggable integrations via `Sentry.lazyLoadIntegration()`. This will attempt to load the integration from the Sentry CDN. Note that this function will reject if it fails to load the integration from the Sentry CDN, which can happen if a user has an ad-blocker or if there's a network problem. You should always make sure that rejections are handled for this function in your application.

```javascript
async function loadHttpClient() {
  const httpClientIntegration = await Sentry.lazyLoadIntegration(
    "httpClientIntegration",
  );
  Sentry.addIntegration(httpClientIntegration());
}
```

Lazy loading is available for the following integrations:

* `replayIntegration`
* `replayCanvasIntegration`
* `feedbackIntegration`
* `feedbackModalIntegration`
* `feedbackScreenshotIntegration`
* `captureConsoleIntegration`
* `contextLinesIntegration`
* `linkedErrorsIntegration`
* `dedupeIntegration`
* `extraErrorDataIntegration`
* `httpClientIntegration`
* `reportingObserverIntegration`
* `rewriteFramesIntegration`
* `browserProfilingIntegration`

## [Removing a Default Integration](https://docs.sentry.io/.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/.md#custom-integrations)

You can also create [custom integrations](https://docs.sentry.io/custom.md).

## [Available Integrations](https://docs.sentry.io/.md#available-integrations)

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

  Adds instrumentation for Amqplib. (default)

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

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

* #### [Breadcrumbs](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/breadcrumbs.md)

  Wraps native browser APIs to capture breadcrumbs. (default)

* #### [BrowserApiErrors](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/browserapierrors.md)

  Wraps native time and events APIs (\`setTimeout\`, \`setInterval\`, \`requestAnimationFrame\`, \`addEventListener/removeEventListener\`) in \`try/catch\` blocks to handle async exceptions. (default)

* #### [BrowserProfiling](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/browserprofiling.md)

  Capture profiling data for the Browser.

* #### [BrowserSession](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/browsersession.md)

  Track healthy Sessions in the Browser.

* #### [BrowserTracing](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/browsertracing.md)

  Capture performance data for the Browser.

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

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

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

  Capture console logs as breadcrumbs. (default)

* #### [Context](https://docs.sentry.io/platforms/javascript/guides/solidstart/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/solidstart/configuration/integrations/contextlines.md)

  Adds source code from inline JavaScript of the current page's HTML.

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

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

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

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

* #### [FunctionToString](https://docs.sentry.io/platforms/javascript/guides/solidstart/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 Feature Flags Integration](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/featureflags.md)

  Learn how to attach custom feature flag data to Sentry error events.

* #### [GlobalHandlers](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/globalhandlers.md)

  Attaches global handlers to capture uncaught exceptions and unhandled rejections. (default)

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

  Adds instrumentation for GraphQL. (default)

* #### [GraphQLClient](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/graphqlclient.md)

  Enhance spans and breadcrumbs with data from GraphQL requests.

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

  Capture spans & breadcrumbs for http requests. (default)

* #### [HttpClient](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/httpclient.md)

  Captures errors on failed requests from Fetch and XHR and attaches request and response information.

* #### [HttpContext](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/httpcontext.md)

  Attaches HTTP request information, such as URL, user-agent, referrer, and other headers to the event. (default)

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

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

* #### [LaunchDarkly](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/launchdarkly.md)

  Learn how to use Sentry with LaunchDarkly.

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

  Allows you to configure linked errors. (default)

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

  Add local variables to exception frames. (default)

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

  Adds instrumentation for LRU Memoizer. (default)

* #### [ModuleMetadata](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/modulemetadata.md)

  Adds module metadata to stack frames.

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

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

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

  Adds instrumentation for MongoDB. (default)

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

  Adds instrumentation for MySQL. (default)

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

  Adds instrumentation for MySQL2. (default)

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

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

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

  Capture profiling data for Node.js applications.

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

  Registers handlers to capture global uncaught exceptions. (default)

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

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

* #### [OpenFeature](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/openfeature.md)

  Learn how to use Sentry with OpenFeature.

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

  Adds instrumentation for Postgres. (default)

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

  Adds instrumentation for Prisma.

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

  Adds instrumentation for Redis. (default)

* #### [Replay](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/replay.md)

  Capture a video-like reproduction of what was happening in the user's browser.

* #### [ReplayCanvas](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/replaycanvas.md)

  Capture session replays from HTML canvas elements.

* #### [ReportingObserver](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/reportingobserver.md)

  Captures the reports collected via the \`ReportingObserver\` interface and sends them to Sentry.

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

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

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

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

* #### [Statsig](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/statsig.md)

  Learn how to use Sentry with Statsig.

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

  Adds instrumentation for Supabase client operations.

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

  Adds instrumentation for Tedious. (default)

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

  Capture spans & errors for tRPC handlers.

* #### [Unleash](https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/integrations/unleash.md)

  Learn how to use Sentry with Unleash.

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

  Adds instrumentation for Vercel AI SDK.
