# Default Integrations | Sentry for React Native

The below system integrations are part of the standard library or the interpreter itself and are enabled by default. To understand what they do and how to disable them if they cause issues, read on.

## [What's Enabled by Default](https://docs.sentry.io/platforms/react-native/integrations/default.md#whats-enabled-by-default)

### [InboundFilters](https://docs.sentry.io/platforms/react-native/integrations/default.md#inboundfilters)

*Import name: `Sentry.inboundFiltersIntegration`*

This integration allows you to ignore specific errors based on the type, message, or URLs in a given exception.

By default, it'll ignore errors that start with `Script error` or `JavaScript error: Script error`.

To configure this integration, use the `ignoreErrors`, `ignoreTransactions`, `denyUrls`, and `allowUrls` SDK options directly. Keep in mind that `denyURLs` and `allowURLs` only work for captured exceptions, not raw message events.

### [FunctionToString](https://docs.sentry.io/platforms/react-native/integrations/default.md#functiontostring)

*Import name: `Sentry.functionToStringIntegration`*

This integration allows the SDK to provide original functions and method names, even when those functions or methods are wrapped by our error or breadcrumb handlers.

### [Breadcrumbs](https://docs.sentry.io/platforms/react-native/integrations/default.md#breadcrumbs)

*Import name: `Sentry.breadcrumbsIntegration`*

This integration wraps native APIs to capture breadcrumbs. By default, the Sentry SDK wraps all APIs.

Available options:

```javascript
{
  // Log calls to `console.log`, `console.debug`, etc
  console: boolean;

  // Log all click and keypress events
  // - When an object with `serializeAttribute` key is provided,
  //   Breadcrumbs integration will look for given attribute(s) in DOM elements,
  //   while generating the breadcrumb trails.
  //   Matched elements will be followed by their custom attributes,
  //   instead of their `id`s or `class` names.
  dom: boolean | { serializeAttribute: string | string[] };

  // Log HTTP requests done with the Fetch API
  fetch: boolean;

  // Log calls to `history.pushState` and friends
  history: boolean;

  // Log whenever we send an event to the server
  sentry: boolean;

  // Log HTTP requests done with the XHR API
  xhr: boolean;
}
```

### [NativeLinkedErrors](https://docs.sentry.io/platforms/react-native/integrations/default.md#nativelinkederrors)

*Import name: `Sentry.nativeLinkedErrorsIntegration`*

This integration allows you to configure linked errors which are recursively read up to a specified limit. A lookup by a specific key on the captured Error object is then performed. By default, the integration records up to five errors and the key used for recursion is `"cause"`.

Available options:

```javascript
{
  key: string; // default: "cause"
  limit: number; // default: 5
}
```

Here's a code example of how this could be implemented:

```javascript
<Button
  title="Get Reviews"
  onPress={async () => {
    const movie = event.target.dataset.title;
    try {
      await fetchMovieReviews(movie);
    } catch (e) {
      const fetchError = new Error(
        `Failed to fetch reviews for: ${movie}`,
      );
      // @ts-expect-error cause is not exposed on default error class.
      fetchError.cause = e;
      Sentry.captureException(fetchError);
    }
  }}
/>;
```

### [HttpContext](https://docs.sentry.io/platforms/react-native/integrations/default.md#httpcontext)

*Import name: `Sentry.httpContextIntegration`*

This integration attaches HTTP request information, such as URL, user-agent, referrer, and other headers to the event. It allows us to correctly catalog and tag events with specific OS, browser, and version information.

### [Dedupe](https://docs.sentry.io/platforms/react-native/integrations/default.md#dedupe)

*Import name: `Sentry.dedupeIntegration`*

This integration is enabled by default, but only deduplicates certain events. It can be helpful if you're receiving many duplicate errors. Note, that Sentry only compares stack traces and fingerprints.

```javascript
Sentry.init({
  dsn: "___PUBLIC_DSN___",
  integrations: [Sentry.dedupeIntegration()],
});
```

## [Modifying System Integrations](https://docs.sentry.io/platforms/react-native/integrations/default.md#modifying-system-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: "___PUBLIC_DSN___",

  integrations: [
    Sentry.breadcrumbsIntegration({
      console: false,
    }),
  ],

});
```

### [Removing an Integration](https://docs.sentry.io/platforms/react-native/integrations/default.md#removing-an-integration)

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";
    });
  },
});
```
