• The Sentry Node SDK Client.

    To use this SDK, call the init function as early as possible in the main entry module. To set context information or send manual events, use the provided methods.

    Parameters

    Returns void

    Example


    const { init } = require('@sentry/node');

    init({
    dsn: '__DSN__',
    // ...
    });

    Example


    const { configureScope } = require('@sentry/node');
    configureScope((scope: Scope) => {
    scope.setExtra({ battery: 0.7 });
    scope.setTag({ user_mode: 'admin' });
    scope.setUser({ id: '4711' });
    });

    Example


    const { addBreadcrumb } = require('@sentry/node');
    addBreadcrumb({
    message: 'My Breadcrumb',
    // ...
    });

    Example


    const Sentry = require('@sentry/node');
    Sentry.captureMessage('Hello, world!');
    Sentry.captureException(new Error('Good bye'));
    Sentry.captureEvent({
    message: 'Manual',
    stacktrace: [
    // ...
    ],
    });

    See

    NodeOptions for documentation on configuration options.

Generated using TypeDoc