@sentry/integrations

  • Version 7.73.0
  • Published
  • 280 kB
  • 5 dependencies
  • MIT license

Install

npm i @sentry/integrations
yarn add @sentry/integrations
pnpm add @sentry/integrations

Overview

Pluggable integrations that can be used to enhance JS SDKs

Index

Classes

class CaptureConsole

class CaptureConsole implements Integration {}
  • Send Console API calls as Sentry Events

constructor

constructor(options?: { levels?: string[] });

property id

static id: string;

property name

name: string;

method setupOnce

setupOnce: (
_: (callback: EventProcessor) => void,
getCurrentHub: () => Hub
) => void;

class ContextLines

class ContextLines implements Integration {}
  • Collects source context lines around the lines of stackframes pointing to JS embedded in the current page's HTML.

    This integration DOES NOT work for stack frames pointing to JS files that are loaded by the browser. For frames pointing to files, context lines are added during ingestion and symbolication by attempting to download the JS files to the Sentry backend.

    Use this integration if you have inline JS code in HTML pages that can't be accessed by our backend (e.g. due to a login-protected page).

constructor

constructor(_options?: ContextLinesOptions);

    property id

    static id: string;

    property name

    name: string;

    method addSourceContext

    addSourceContext: (event: Event) => Event;
    • Processes an event and adds context lines

    method setupOnce

    setupOnce: (
    addGlobalEventProcessor: (callback: EventProcessor) => void,
    getCurrentHub: () => Hub
    ) => void;

    class Debug

    class Debug implements Integration {}
    • Integration to debug sent Sentry events. This integration should not be used in production

    constructor

    constructor(options?: DebugOptions);

      property id

      static id: string;

      property name

      name: string;

      method setupOnce

      setupOnce: (
      _addGlobalEventProcessor: (eventProcessor: EventProcessor) => void,
      getCurrentHub: () => Hub
      ) => void;

      class Dedupe

      class Dedupe implements Integration {}
      • Deduplication filter

      constructor

      constructor();

        property id

        static id: string;

        property name

        name: string;

        method setupOnce

        setupOnce: (
        addGlobalEventProcessor: (callback: EventProcessor) => void,
        getCurrentHub: () => Hub
        ) => void;

        class ExtraErrorData

        class ExtraErrorData implements Integration {}
        • Patch toString calls to return proper name for wrapped functions

        constructor

        constructor(options?: ExtraErrorDataOptions);

        property id

        static id: string;

        property name

        name: string;

        method enhanceEventWithErrorData

        enhanceEventWithErrorData: (event: Event, hint?: EventHint) => Event;
        • Attaches extracted information from the Error object to extra field in the Event

        method setupOnce

        setupOnce: (
        addGlobalEventProcessor: (callback: EventProcessor) => void,
        getCurrentHub: () => Hub
        ) => void;

        class HttpClient

        class HttpClient implements Integration {}
        • HTTPClient integration creates events for failed client side HTTP requests.

        constructor

        constructor(options?: Partial<HttpClientOptions>);
        • Parameter options

        property id

        static id: string;

        property name

        name: string;

        method setupOnce

        setupOnce: (
        _: (callback: EventProcessor) => void,
        getCurrentHub: () => Hub
        ) => void;
        • Parameter options

        class Offline

        class Offline implements Integration {}
        • cache offline errors and send when connected

          Deprecated

          The offline integration has been deprecated in favor of the offline transport wrapper.

          http://docs.sentry.io/platforms/javascript/configuration/transports/#offline-caching

        constructor

        constructor(options?: { maxStoredEvents?: number });

        property hub

        hub?: Hub;
        • the current hub instance

        property id

        static id: string;

        property maxStoredEvents

        maxStoredEvents: number;
        • maximum number of events to store while offline

        property name

        readonly name: string;

        property offlineEventStore

        offlineEventStore: LocalForage;
        • event cache

        method setupOnce

        setupOnce: (
        addGlobalEventProcessor: (callback: EventProcessor) => void,
        getCurrentHub: () => Hub
        ) => void;

        class ReportingObserver

        class ReportingObserver implements Integration {}
        • Reporting API integration - https://w3c.github.io/reporting/

        constructor

        constructor(options?: { types?: ReportTypes[] });

        property id

        static id: string;

        property name

        readonly name: string;

        method handler

        handler: (reports: Report[]) => void;

        method setupOnce

        setupOnce: (
        _: (callback: EventProcessor) => void,
        getCurrentHub: () => Hub
        ) => void;

        class RewriteFrames

        class RewriteFrames implements Integration {}
        • Rewrite event frames paths

        constructor

        constructor(options?: {
        root?: string;
        prefix?: string;
        iteratee?: StackFrameIteratee;
        });

        property id

        static id: string;

        property name

        name: string;

        method process

        process: (originalEvent: Event) => Event;
        • JSDoc

        method setupOnce

        setupOnce: (
        addGlobalEventProcessor: (callback: EventProcessor) => void,
        getCurrentHub: () => Hub
        ) => void;

        class SessionTiming

        class SessionTiming implements Integration {}
        • This function adds duration since Sentry was initialized till the time event was sent

        constructor

        constructor();

          property id

          static id: string;

          property name

          name: string;

          method process

          process: (event: Event) => Event;

          method setupOnce

          setupOnce: (
          addGlobalEventProcessor: (callback: EventProcessor) => void,
          getCurrentHub: () => Hub
          ) => void;

          class Transaction

          class Transaction implements Integration {}
          • Add node transaction to the event

          constructor

          constructor();

            property id

            static id: string;

            property name

            name: string;

            method process

            process: (event: Event) => Event;

            method setupOnce

            setupOnce: (
            addGlobalEventProcessor: (callback: EventProcessor) => void,
            getCurrentHub: () => Hub
            ) => void;

            Package Files (12)

            Dependencies (5)

            Dev Dependencies (2)

            Peer Dependencies (0)

            No peer dependencies.

            Badge

            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@sentry/integrations.

            • Markdown
              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@sentry/integrations)
            • HTML
              <a href="https://www.jsdocs.io/package/@sentry/integrations"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>