pan-opt-type-test
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

Panopticon JavaScript SDK

Usage

install SDK from the CLI

npm install pan-opt

initialize Panopticon at the entry point of your app

import Panopticon from "pan-opt";


Panopticon.init(dsn) // dsn: your dsn issued from panopticon.gq

To set context information or send manual errors, use the exported functions of pan-opt.

import Panopticon from "pan-opt";

// Set user information, as well as tags and further extras
Panopticon.setTag('custom', 'Tag');
Panopticon.setTag('foo', 'bar');
Panopticon.setUser('Warden');

// Capture exceptions, send manual errors
try {
  throw new Error("Maybe I'll be caught by try-catch");
} catch (err) {
  Panopticon.send(err);
}

Package Sidebar

Install

npm i pan-opt-type-test

Weekly Downloads

3

Version

1.1.2

License

ISC

Unpacked Size

185 kB

Total Files

18

Last publish

Collaborators

  • earlyhail