ReportingObserver
Captures the reports collected via the `ReportingObserver` interface and sends them to Sentry.
This integration only works inside a browser environment.
Import name: Sentry.reportingObserverIntegration
This integration hooks into the Reporting API and sends captured events through to Sentry. It can be configured to handle specific issue types only.
Copied
import * as Sentry from "___SDK_PACKAGE___";
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.reportingObserverIntegration()],
});
import * as Sentry from "___SDK_PACKAGE___";
Sentry.init({
dsn: "___PUBLIC_DSN___",
integrations: [Sentry.reportingObserverIntegration()],
});
<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>
<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>
<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>
Type: ('crash'|'deprecation'|'intervention')[]
Only handle the given issue types. By default, all issue types are handled.
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").