---
title: "ReportingObserver"
description: "Captures the reports collected via the `ReportingObserver` interface and sends them to Sentry."
url: https://docs.sentry.io/platforms/javascript/guides/sveltekit/configuration/integrations/reportingobserver/
---

# ReportingObserver | Sentry for SvelteKit

This integration only works inside a browser environment.

*Import name: `Sentry.reportingObserverIntegration`*

This integration hooks into the [Reporting API](https://developer.mozilla.org/en-US/docs/Web/API/Reporting_API) and sends captured events through to Sentry. It can be configured to handle specific issue types only.

**npm**

```javascript
import * as Sentry from "___SDK_PACKAGE___";

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

**Loader (v7)**

```html
<script>
  // Configure sentryOnLoad before adding the Loader Script
  window.sentryOnLoad = function () {
    Sentry.init({});

   if (Sentry.reportingObserverIntegration) {
      Sentry.addIntegration(Sentry.reportingObserverIntegration());
    }
  };
</script>

<script
  src="https://js.sentry-cdn.com/___PUBLIC_KEY___.min.js"
  crossorigin="anonymous"
></script>
<script
  src="https://browser.sentry-cdn.com/10.53.1/reportingobserver.min.js"
  integrity="sha384-norqdQEGCfWwIHQxi3oRQeaef6s+UFxhd1eZ+iY+KfwvHpa4i9KIVHc/tbptNr3l"
  crossorigin="anonymous"
></script>
```

**Loader (v8)**

```html
<script>
  // Configure sentryOnLoad before adding the Loader Script
  window.sentryOnLoad = function () {
    Sentry.init({});
    Sentry.lazyLoadIntegration("reportingObserverIntegration").then(
      (integration) => {
        Sentry.addIntegration(integration());
      },
    );
  };
</script>

<script
  src="https://js.sentry-cdn.com/___PUBLIC_KEY___.min.js"
  crossorigin="anonymous"
></script>
```

**CDN**

```html
<script
  src="https://browser.sentry-cdn.com/10.53.1/bundle.tracing.min.js"
  integrity="sha384-FGoRMImH95uAyc72ypTWedaYaOCYskenhS7DgLZp+OsGCx2zs4/Nez3XHPGd55IY"
  crossorigin="anonymous"
></script>
<script
  src="https://browser.sentry-cdn.com/10.53.1/reportingobserver.min.js"
  integrity="sha384-norqdQEGCfWwIHQxi3oRQeaef6s+UFxhd1eZ+iY+KfwvHpa4i9KIVHc/tbptNr3l"
  crossorigin="anonymous"
></script>

<script>
  Sentry.init({
    dsn: "___PUBLIC_DSN___",
    integrations: [Sentry.reportingObserverIntegration()],
  });
</script>
```

## [Options](https://docs.sentry.io/platforms/javascript/guides/sveltekit/configuration/integrations/reportingobserver.md#options)

### [`types`](https://docs.sentry.io/platforms/javascript/guides/sveltekit/configuration/integrations/reportingobserver.md#types)

*Type: `('crash'|'deprecation'|'intervention')[]`*

Only handle the given issue types. By default, all issue types are handled.
