Skip to content

jaikoo/bloop-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@bloop/sdk

Lightweight error reporting SDK for Bloop — self-hosted error tracking.

Install

npm install @bloop/sdk

Usage

import { BloopClient } from "@bloop/sdk";

const bloop = new BloopClient({
  endpoint: "https://errors.myapp.com",
  projectKey: "bloop_abc123...",
  environment: "production",
  release: "1.2.0",
});

// Capture an Error object
try {
  riskyOperation();
} catch (err) {
  bloop.captureError(err, { route: "POST /api/users", httpStatus: 500 });
}

// Capture a structured event
bloop.capture({
  errorType: "ValidationError",
  message: "Invalid email format",
  route: "POST /api/users",
  httpStatus: 422,
});

// Flush on shutdown
await bloop.shutdown();

Features

  • Zero dependencies — Uses the Web Crypto API (works in Node.js and browsers)
  • Automatic batching — Events are buffered and sent in configurable batches
  • HMAC-SHA256 signing — All requests are cryptographically signed
  • Graceful shutdownshutdown() flushes pending events before exit

License

MIT

About

Bloop error tracking SDK for TypeScript / Node.js

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors