Optional
options: AWSLambda.NodeOptions
const { init } = require('@sentry/node');
init({
dsn: '__DSN__',
// ...
});
const { configureScope } = require('@sentry/node');
configureScope((scope: Scope) => {
scope.setExtra({ battery: 0.7 });
scope.setTag({ user_mode: 'admin' });
scope.setUser({ id: '4711' });
});
const { addBreadcrumb } = require('@sentry/node');
addBreadcrumb({
message: 'My Breadcrumb',
// ...
});
const Sentry = require('@sentry/node');
Sentry.captureMessage('Hello, world!');
Sentry.captureException(new Error('Good bye'));
Sentry.captureEvent({
message: 'Manual',
stacktrace: [
// ...
],
});
NodeOptions for documentation on configuration options.
Generated using TypeDoc
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.