UNPKG

@sentry/browser

Version:
70 lines 1.87 kB
import type { Client, Integration, Options, ReportDialogOptions } from '@sentry/core'; import type { BrowserOptions } from './client'; /** Get the default integrations for the browser SDK. */ export declare function getDefaultIntegrations(_options: Options): Integration[]; /** Exported only for tests. */ export declare function applyDefaultOptions(optionsArg?: BrowserOptions): BrowserOptions; /** * The Sentry Browser SDK Client. * * To use this SDK, call the {@link init} function as early as possible when * loading the web page. To set context information or send manual events, use * the provided methods. * * @example * * ``` * * import { init } from '@sentry/browser'; * * init({ * dsn: '__DSN__', * // ... * }); * ``` * * @example * ``` * * import { addBreadcrumb } from '@sentry/browser'; * addBreadcrumb({ * message: 'My Breadcrumb', * // ... * }); * ``` * * @example * * ``` * * import * as Sentry from '@sentry/browser'; * Sentry.captureMessage('Hello, world!'); * Sentry.captureException(new Error('Good bye')); * Sentry.captureEvent({ * message: 'Manual', * stacktrace: [ * // ... * ], * }); * ``` * * @see {@link BrowserOptions} for documentation on configuration options. */ export declare function init(browserOptions?: BrowserOptions): Client | undefined; /** * Present the user with a report dialog. * * @param options Everything is optional, we try to fetch all info need from the global scope. */ export declare function showReportDialog(options?: ReportDialogOptions): void; /** * This function is here to be API compatible with the loader. * @hidden */ export declare function forceLoad(): void; /** * This function is here to be API compatible with the loader. * @hidden */ export declare function onLoad(callback: () => void): void; //# sourceMappingURL=sdk.d.ts.map