Custom Integrations

Learn how you can enable a custom integration.

In addition to the integrations that come with the SDK, you can also write custom integrations.

Custom integration must conform to the Integration interface.

Add a custom integration to your JavaScript using the following format

Copied
class MyAwesomeIntegrations {
  static id = 'MyAwesomeIntegration';
  name = 'MyAwesomeIntegration';

  setupOnce() {
    // Do something when the integration is initialized
  }
}

Sentry.init({
  // ...
  integrations: [new MyAwesomeIntegration()],
});
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").