sentries
v0.2.2
Published
Isomorphic Sentry package that works both in client and server
Readme
sentries
Sentry js package that works in browser, node and Cloudflare workers.
In full stack frameworks like Next.js you only need to import Sentry once and it works everywhere. No need to create super complex setups with a different config for each runtime and making sure the right sentry package is imported in the right place.
Example usage:
import * as Sentry from 'sentries'
Sentry.init({
dsn: '...',
tracesSampleRate: 0.01,
profilesSampleRate: 0.01,
sendDefaultPii: true,
})
export function notifyError(error, msg?: string) {
console.error(msg, error)
Sentry.captureException(error, { extra: { msg } })
}