@nativescript-community/sentry
    Preparing search index...

    Interface NativescriptOptions

    Configuration options for the Sentry Nativescript SDK.

    NativescriptFrontend for more information.

    interface NativescriptOptions {
        appHangTimeoutInterval?: number;
        appPrefix?: string;
        attachScreenshot?: boolean;
        attachThreads?: boolean;
        attachViewHierarchy?: boolean;
        autoInitializeNativeSdk?: boolean;
        breadcrumbs?: {
            console?: boolean;
            dom?: boolean;
            fetch?: boolean;
            history?: boolean;
            sentry?: boolean;
            xhr?: boolean;
        };
        colnoOffset?: number;
        disabledNativeIntegrations?: string[];
        enableAppHangTracking?: boolean;
        enableAutoPerformanceTracing?: boolean;
        enableAutoSessionTracking?: boolean;
        enableCaptureFailedRequests?: boolean;
        enableNative?: boolean;
        enableNativeCrashHandling?: boolean;
        enableNativeFramesTracking?: boolean;
        enableNativeNagger?: boolean;
        enableNdk?: boolean;
        enableNdkScopeSync?: boolean;
        enableSpotlight?: boolean;
        enableStallTracking?: boolean;
        enableTracing?: boolean;
        enableWatchdogTerminationTracking?: boolean;
        flushSendEvent?: boolean;
        headers?: { [k: string]: string };
        maxCacheItems?: number;
        maxQueueSize?: number;
        onerror?: boolean;
        onReady?: (response: { didCallNativeInit: boolean }) => void;
        onunhandledrejection?: boolean;
        sessionTrackingIntervalMillis?: number;
        spotlightSidecarUrl?: string;
        [k: string]: any;
    }

    Hierarchy

    • CoreOptions<BrowserTransportOptions>
    • BaseNativescriptOptions
    • NativescriptErrorHandlersOptions
      • NativescriptOptions

    Indexable

    • [k: string]: any
    Index

    Properties

    appHangTimeoutInterval?: number

    The minimum amount of time an app should be unresponsive to be classified as an App Hanging. The actual amount may be a little longer. Avoid using values lower than 100ms, which may cause a lot of app hangs events being transmitted. Value should be in seconds.

    iOS only

    2
    
    appPrefix?: string

    Optional prefix to add while rewriting frames

    attachScreenshot?: boolean

    When enabled and a user experiences an error, Sentry provides the ability to take a screenshot and include it as an attachment.

    false
    
    attachThreads?: boolean

    When enabled, all the threads are automatically attached to all logged events on Android

    attachViewHierarchy?: boolean

    When enabled Sentry includes the current view hierarchy in the error attachments.

    false
    
    autoInitializeNativeSdk?: boolean

    Initializes the native SDK on init. Set this to false if you have an existing native SDK and don't want to re-initialize.

    NOTE: Be careful and only use this if you know what you are doing. If you use this flag, make sure a native SDK is running before the JS Engine initializes or events might not be captured. Also, make sure the DSN on both the React Native side and the native side are the same one. We strongly recommend checking the documentation if you need to use this.

    true
    
    breadcrumbs?: {
        console?: boolean;
        dom?: boolean;
        fetch?: boolean;
        history?: boolean;
        sentry?: boolean;
        xhr?: boolean;
    }
    colnoOffset?: number

    offset applied to errors colno

    disabledNativeIntegrations?: string[]

    native integrations to disable.

    Android only — sentry-cocoa 9 removed the integrations list, so on iOS use the dedicated native options instead (e.g. enableWatchdogTerminationTracking).

    enableAppHangTracking?: boolean

    When enabled, the SDK tracks when the application stops responding for a specific amount of time defined by the appHangTimeoutInterval option.

    iOS only

    true
    
    enableAutoPerformanceTracing?: boolean

    Enable auto performance tracking by default. Renamed from enableAutoPerformanceTracking in v5.

    enableAutoSessionTracking?: boolean

    Should sessions be tracked to Sentry Health or not. Default to true!

    enableCaptureFailedRequests?: boolean

    When enabled, Sentry will capture failed XHR/Fetch requests. This option also enabled HTTP Errors on iOS. Sentry Android Gradle Plugin is needed to capture HTTP Errors on Android.

    false
    
    enableNative?: boolean

    Enables native transport + device info + offline caching. Be careful, disabling this also breaks automatic release setting. This means you have to manage setting the release yourself. Defaults to true.

    enableNativeCrashHandling?: boolean

    Enables native crashHandling. This only works if enableNative is true. Defaults to true.

    enableNativeFramesTracking?: boolean

    Track the slow and frozen frames in the application. Enabling this options will add slow and frozen frames measurements to all created root spans (transactions).

    true
    
    enableNativeNagger?: boolean

    Should the native nagger alert be shown or not.

    enableNdk?: boolean

    Enable NDK on Android

    true
    
    enableNdkScopeSync?: boolean

    Enable scope sync from Java to NDK on Android Only has an effect if enableNdk is true.

    enableSpotlight?: boolean

    This option will enable forwarding captured Sentry events to Spotlight.

    More details: https://spotlightjs.com/

    IMPORTANT: Only set this option to true while developing, not in production!

    enableStallTracking?: boolean

    Track when and how long the JS event loop stalls for. Adds stalls as measurements to all transactions.

    true
    
    enableTracing?: boolean

    Enable tracing for the application (same as setting tracesSampleRate or tracesSampler).

    false
    
    enableWatchdogTerminationTracking?: boolean

    Enables Out of Memory Tracking for iOS and macCatalyst. See the following link for more information and possible restrictions: https://docs.sentry.io/platforms/apple/guides/ios/configuration/out-of-memory/

    Renamed from enableOutOfMemoryTracking in v5.

    true
    
    flushSendEvent?: boolean
    headers?: { [k: string]: string }
    maxCacheItems?: number

    The max cache items for capping the number of envelopes.

    30
    
    maxQueueSize?: number

    The max queue size for capping the number of envelopes waiting to be sent by Transport.

    onerror?: boolean

    Capture uncaught errors.

    On runtimes dispatching the global WHATWG error events (9.1+) this listens to globalThis error events and defaults to true — uncaught errors no longer crash the app there, so nothing else would report them. On older runtimes it listens to Application.discardedErrorEvent and defaults to false.

    onReady?: (response: { didCallNativeInit: boolean }) => void

    Callback that is called after the RN SDK on the JS Layer has made contact with the Native Layer.

    onunhandledrejection?: boolean

    Capture unhandled promise rejections.

    On runtimes dispatching the global WHATWG error events (9.1+) this listens to globalThis unhandledrejection events (and leaves a breadcrumb on rejectionhandled) and defaults to true. On older runtimes it listens to Application.uncaughtErrorEvent and defaults to false.

    sessionTrackingIntervalMillis?: number

    The interval to end a session if the App goes to the background.

    spotlightSidecarUrl?: string

    This option changes the default Spotlight Sidecar URL.

    By default, the SDK expects the Sidecar to be running on the same host as React Native Metro Dev Server.

    More details: https://spotlightjs.com/

    "http://localhost:8969/stream"