New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

errsole

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errsole

Capture, Reproduce and Debug Node.js Errors

  • 1.6.0
  • unpublished
  • npm
  • Socket score

Version published
Weekly downloads
406
decreased by-42.98%
Maintainers
1
Weekly downloads
 
Created
Source

Error Logger and Remote Debugger for Node.js Apps


npm version

:star: We appreciate your star. It helps!

Table of Contents



Getting Started

Install

Errsole is a Node.js module. You can install this module using the npm install command:

npm install errsole

Configure

You must obtain a unique token to configure the Errsole module in your app.

Follow the steps below to generate a unique token:

  1. Click on the button below to go to the Errsole website.
  2. Create an Errsole account or sign in with an existing one.
  3. Create an entry for your app.
  4. Copy the code snippet generated for your app, which includes a unique token.
  5. Insert the code snippet as the first line of your app's main file.
  6. Deploy your app as usual. Once deployed, Errsole will start capturing errors and associating them with your app's entry in the Errsole platform.

Setup Errsole


Example

/**
 * Insert this Errsole code snippet as the first line of your app's main file
 */
const errsole = require('errsole');
errsole.initialize({
  framework: 'express',
  token: '[Your Errsole Token]',
  exitOnException: true,
  skipRoutes: [{
    method: 'POST',
    path: '/users/login'
  }],
  filterRoutes: [{
    method: 'PUT',
    path: '/users/:userId/profile'
  }],
  enableSessionLogs: true,
  responseTimeThreshold: 1000,
  slowRequestsTimeInterval: 24,
  enableDebugger: true,
  evalExpression: true
});
// End of Errsole code snippet

/**
 * Your app code starts here
 */
const express = require('express');
const app = express();

app.get('/', function (req, res) {
  res.send('Hello World');
});

app.listen(3000);

Advanced Configuration

NameTypeDescription
frameworkstringRequired. Your Node.js framework name.
tokenstringRequired. Create a unique token for your app on the Errsole website.
exitOnExceptionbooleanOptional. The default value is true.

By default, Errsole will exit the process after capturing an uncaught exception. If this is not the behavior you want, you can disable it by setting exitOnException to false.
skipRoutesArrayOptional. The default value is [].

Errsole does not save any HTTP requests that match the routes specified in this list.
filterRoutesArrayOptional. The default value is [].

Errsole only captures the Method, URL, and Status Code of HTTP requests that match the routes specified in this list.
enableSessionLogsbooleanOptional. The default value is true.

This parameter controls whether to save session logs in addition to error details. For more information on session logs, please click here.
responseTimeThresholdnumberOptional. The default value is 1000.

This parameter specifies a benchmark duration in milliseconds that Errsole uses to recognize slow HTTP requests. By default, this threshold is set to 1000 milliseconds (1 second), meaning that any HTTP request that takes longer than one second to complete is categorized as slow.
slowRequestsTimeIntervalnumberOptional. The default value is 24.

This parameter defines a designated time interval for gathering data on slow requests. You can select from four valid options: 1, 6, 12, and 24, corresponding to 1-hour, 6-hour, 12-hour, and 24-hour time intervals.
enableDebuggerbooleanOptional. The default value is true.

If false, the Errsole Debugger is disabled.
evalExpressionbooleanOptional.

If true, your developers have the ability to evaluate JavaScript expressions while debugging an error.

This feature allows your developers to debug your app's code more effectively, but it also grants them the ability to run arbitrary code on your server.

You have two options: You can set it to false here to disable the eval expression option for all developers, or you can set it to true here and manage the permissions of each developer on the errsole website.


Features

Error Logging

Errsole captures and saves all errors that occur in your app across all servers and environments.

  • Centralized error logging
  • Errors
  • Uncaught exceptions
  • 5xx server errors
  • Error grouping

Request Logging

In addition to capturing errors, Errsole also captures the corresponding HTTP requests that caused the errors.

  • HTTP requests that caused errors
  • HTTP requests that caused uncaught exceptions
  • HTTP requests with 5xx error responses
Session Logs

Sometimes, the issue might be related to the request body, which could have been constructed based on the responses from previous requests. In the session logs, Errsole saves the series of requests made by the user leading up to the error.


Error Reproduction

Errsole starts a sandbox app on your server, which is a clone of your live app. Within this sandbox app, you can reproduce errors and inspect every line of the code without affecting the live app.

  • Reproduce errors
  • Reproduce uncaught exceptions
  • Reproduce 5xx server errors
  • Your live app is unaffected
  • Your app users are unaffected

Remote Debugging

With a feature-rich debugger directly connected to a sandbox app, you can set breakpoints, reproduce errors, inspect variables, and verify the fixes - all without affecting your live app.

  • Set breakpoints
  • Inspect variables
  • Verify the fixes
  • Your live app is unaffected
  • Your app users are unaffected

Collaboration

You can invite developers to your app, manage their permissions, and assign errors to individual developers. These developers can then troubleshoot the assigned errors within their dedicated sandbox apps.

  • Invite developers
  • Assign errors
  • Concurrent debugging


Demo Video

https://github.com/errsole/errsole.js/assets/3775513/f7dadda0-9dc9-4827-9d96-2b7e41473a5d



Try Live Demo

Experience Errsole firsthand by troubleshooting errors in our demo app:

Try Live Demo



Documentation

For a complete product documentation, please visit our documentation page:

https://www.errsole.com/documentation/



Support

:star: We appreciate your star. It helps!

If you run into any issues, please email us at support@errsole.com.

For bug reports, please open an issue on GitHub.


License

MIT

Keywords

FAQs

Package last updated on 22 Sep 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc