Giter Club home page Giter Club logo

deadorbit's Introduction

DeadOrbit

Members of Dead Orbit intend to escape the dying Earth before The Darkness returns, as they've given up on The Traveler and put little faith in The City's ability to hold out against a major attack.

Dead Orbit is a flexible JavaScript utility to log errors in NodeJS and the browser.

Usage

An instance of DeadOrbit is configured with a driver that accepts a standardized error information object and communicates with a logging service, and optionally a processor that can modify or reject the error.

var DeadOrbit = require('deadorbit');
var SentryDriver = require('deadorbit/drivers/sentry');
var BrowserProcessor = require('deadorbit/processors/browserEnv');

var sentryDriver = new SentryDriver({
  server: 'https://sentry.example.com/',
  project: '25',
  key: 'abcde12345'
});
var browserProcessor = new BrowserProcessor();
var deadOrbit = new DeadOrbit(sentryDriver, browserProcessor);

See the drivers directory for more information about the available drivers and the parameters they accept. Likewise, see the processors directory for information about processors.

Errors can be reported by passing an Error instance to the "report" method.

deadOrbit.report(new Error('Test error message'));

The report method also accepts an optional "options" parameter, which can contain the following keys:

  • tags
  • user

Standardized Error Info

A standardized error info object is created by core Dead Orbit code, and is passed to the "process" and "report" methods of processors and drivers.

The standardized error information object can contain the following keys:

  • message The Error's message
  • type The Error's type
  • stacks An array of frame objects
  • user A user object
  • tags An array of custom tags
  • environment An object containing information about the current environment.

A frame object can contain the following keys:

  • fileName The filename for this frame.
  • functionName The function name for this frame.
  • lineNumber The line number for this frame.
  • columnNumber The columne number for this frame.
  • args An array of arguments give to the function of this frame.

Known Issues

  • Drivers have a hard dependency on network communication dependencies. These should be injectable as well. (Milestone: 2.0.0)
  • Sentry driver has poor backwards compatiblity due to the network communication dependency. (Milestone: 2.0.0)
  • Airbrake driver is not yet written. (Milestone: 1.1.0)
  • Project isn't called "dinklebot".

deadorbit's People

Contributors

terinjokes avatar

Stargazers

Arda Acar avatar Jimmy Yuen Ho Wong avatar Angus H. avatar Mathieu M-Gosselin avatar Andrew Kennedy avatar  avatar Osvaldo Santana Neto avatar Marcus R. Brown avatar Yosh avatar  avatar David Cramer avatar Alexandru Vlăduţu avatar Jarrett Cruger avatar Tony Stuck avatar Paul Friedman avatar

Watchers

Dane avatar Yevgen Safronov avatar Tony Stuck avatar James Culveyhouse avatar  avatar Kristján Oddsson avatar Nick Balestra-Foster avatar Jeremy Teale avatar John Fawcett avatar David Schlesinger avatar James Cloos avatar Preston Pham avatar Vojtech Miksu avatar Jonathan Stasiak avatar nick comer avatar  avatar Henry Andrews avatar  avatar  avatar Vlad Krasnov avatar Kenneth R. Carter avatar  avatar

deadorbit's Issues

Update sentry driver

The sentry driver is really old, Sentry is at version 8 now and the Auth mechanism and APIs are different. This needs to be updated.

errInfo doesn't have a stack property

This creates a problem for someone who wants to write a console driver to just log things out. The person now won't have any idea how to merge the stacks back to a single stack so the browser can display a clickable message

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.