@santry/browser
TypeScript icon, indicating that this package has built-in type declarations

1.3.24 • Public • Published


Santry

에러 및 로그 모니터링 플랫폼

Thanks for BoostCamp2020




@santry/browser

clone project of sentry

Install

npm install @santry/browser

Usage

After generating an error, place the function in the catch.

const { init, captureError } = require('@santry/browser');

const dsn = '[token]@[url]';

init(dsn);

const testError = () => {
  try {
    throw new Error('testing Error');
  } catch (error) {
    captureError(error);
  }
};

testError();

Functions

init([dsn] [, options])

If you want to use functions, use it first.

options

  • traceSampleRate Set the percentage to collect errors or messages. This can be a number between 0 and 1.
  • release Set the release version of your code.
  • environment Set the environment of your code.
  • unhandleRejectionLevel Set the level when an unhandleRejection error occurs. This is the setting for the whole unhandleRejection error.
  • uncaughtExceptionLevel Set the level when an uncaughtException error occurs. This is the setting for the whole uncaughtException error.

captureError([error] [, level])

Errors can be collected.

setContext([context])

Set context of error or mesaage

Readme

Keywords

none

Package Sidebar

Install

npm i @santry/browser

Weekly Downloads

18

Version

1.3.24

License

MIT

Unpacked Size

116 kB

Total Files

8

Last publish

Collaborators

  • hyezzang
  • mononomo
  • eunbinn
  • seokmin