Documentation - v7.4.0
    Preparing search index...
    • Creates an isolated monitor with its own error-collection callback and display.

      Each consumer (SDK) should create its own monitor so that error-collection callbacks do not clobber each other when several SDKs share the same @datadog/js-core/monitor module instance.

      Parameters

      • display: Display

        Display used for debug logging (see createDisplay in @datadog/js-core/util). Lets the consumer control the log prefix and console binding. Debug output is only emitted when debug mode is enabled (see setDebugMode/getDebugMode).

      • onMonitorErrorCollected: (error: unknown) => void

        Callback invoked with each error caught by the monitor (e.g. to forward it to telemetry). Fixed for the lifetime of the monitor.

      Returns Monitor

      A Monitor.