@biwave/node
v0.5.1
Published
Biwave Node.js SDK — unhandled exception & rejection capture, process/runtime context, code snippets
Maintainers
Readme
@biwave/node
Node.js integration SDK for Biwave error tracking, performance monitoring, and logging.
Features
- Global Error Handlers: Catches process
uncaughtExceptionandunhandledRejectionevents automatically. - Process & System Context: Auto-detects Node.js version, OS platform, architecture, hostname, memory, and application dependencies from
package.json. - Source Code Context: Captures surrounding code lines around stack trace locations.
- Auto Breadcrumbs: Intercepts
http/httpsoutgoing requests and console logs. - Request Scope: Request-scoped isolation using
AsyncLocalStorage(RequestScope). - Graceful Shutdown: Hooks into
process.exit,beforeExit, andSIGTERMto flush buffered events.
Installation
# pnpm
pnpm add @biwave/node @biwave/core
# npm
npm install @biwave/node @biwave/core
# yarn
yarn add @biwave/node @biwave/coreBasic Usage
import { init } from '@biwave/node';
const client = init({
clientId: 'your-client-id',
environment: 'production',
});
// Manual error capture
try {
throw new Error('Database connection failed');
} catch (err) {
client.captureException(err);
}License
MIT © Bitech.id
