New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@bugrecorder/sdk

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bugrecorder/sdk

A lightweight package for monitoring server-side performance metrics and catching errors.

latest
npmnpm
Version
1.1.39
Version published
Maintainers
1
Created
Source

@bugrecorder/sdk

A lightweight package for monitoring server-side performance metrics and catching errors.

LIMITATION

Please note that this package will work on your self hosted App (Node.js, Bun, Next.js, Deno on a VPS) means it will not work on any serverless platform Like (Vercel, AWS Lambda, Netlify, etc.).

Features

  • Server-side error catching and reporting
  • Real-time performance metrics monitoring (Specifickly to your Application server not whole server)
    • CPU usage tracking (percentage%)
    • Memory usage monitoring (Application Server usage)
    • Network metrics (how much network sent/recived from your Application server)
    • File Read and Write (how much megabyte read/write by your Application)

Installation

npm i @bugrecorder/sdk --save

This package can be used in :

  • Node.js
  • Next.js
  • Bun
  • Deno "npm:@bugrecorder/sdk"

First, initialize the SDK with your API key and domain:

client.init({
    apiKey: "1234567890",
    domain: "test.bugrecorder.com"
});

Track CPU, MEMORY, FILE (read/write), Network metrics

This will send the metric to the dashboard automatickly

client.monitor({
    serverName: "server_dev_1",
    onData: (data) => {
        console.log("data from monitor", data);
    },
    onError: (error) => {
        console.log("error from monitor", error);
    }
});

Send Server Side Errors

client.sendError({
    domain: "test.bugrecorder.com",
    message: "test",
    stack: "test",
    context: "test"
});

Notes:

  • for the File System metrics (disk_read,disk_write): it needs to be any Linux system to get the vales for mac or windows you will get disk_read:0 and disk_read:0

  • if you are using pm2 with cluster ( exec_mode: 'cluster', // enables load balancing), in order to track each instance it needs to have a seprate name so add instance_var: 'INSTANCE_ID' either into ecosystem.config.js file or cli

client.monitor({
      serverName: `server-${
        isNotEmpty(process.env.INSTANCE_ID) ? process.env.INSTANCE_ID : 'dev'
      }`})

this way you will have server-0 server-1 server-1 ....

Server Side Logging

You can use the logger to send logs to the dashboard. The logs will be stored and searchable in the dashboard.

import { logger } from '@bugrecorder/sdk';

logger.error(args);
logger.info(args);
logger.warning(args);
logger.debug(args);
logger.fatal(args);
logger.success(args);
logger.test(args);
logger.console(args);

Support

if you have any issue, or need support contact us at dev @ bugrecorder.com (remove space it was added to prevent spam)

Keywords

node.js report errors

FAQs

Package last updated on 29 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts