1.3.24 • Published 3 years ago

@santry/browser v1.3.24

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

npm.io npm.io npm.io npm.io npm.io

npm.io


@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)

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)

Errors can be collected.

setContext(context)

Set context of error or mesaage

1.3.24

3 years ago

1.3.23

3 years ago

1.3.22

3 years ago

1.3.21

3 years ago

1.3.19

3 years ago

1.3.20

3 years ago

1.3.18

3 years ago

1.3.17

3 years ago

1.3.16

3 years ago

1.3.13

3 years ago

1.3.14

3 years ago

1.3.11

3 years ago

1.3.12

3 years ago

1.3.15

3 years ago

1.3.7

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

2.0.0

3 years ago

1.1.1

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago