Giter Site home page Giter Site logo

trackjs / redux-trackjs-logger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from timarney/redux-trackjs-logger

2.0 6.0 0.0 428 KB

Pull togther the power of your Error Tracking Service with Redux Dev Tools in a production setting

License: MIT License

JavaScript 92.94% HTML 7.06%

redux-trackjs-logger's Introduction

#The Inspiration I was listening to @react30 ... at about this point https://youtu.be/JTFYyK3yFmE?t=698 ๐Ÿ’ก ๐Ÿ’ก ๐Ÿ’ก

So I tried something and tweeted about it https://twitter.com/timarney/status/764192482535940096 and here we are (check the note about the future below).

#What Error tracking services such as TrackJS offer great insights into where errors happen. They give us stack traces, network information, grouped error reports and much more.

Redux + Redux Dev Tools give us the ability to step-through state and toggle actions. We can replay and even export / import state when developing locally.

If an error is thrown in production it would be amaizing to get the Error Report and also be able to see what actions happened leading up to that error. Essentially getting your local development enviroment / app back to the state where the error occured so you can debug locally.

#The Goal This project aims to combine Error tracking with Redux Dev Tools to capture errors and user actions from a production setting.

#Use Case

  1. Redux Middleware is setup to capture an array of actions when an error is thrown on XYZ.com (live version)
  2. Aug 15th 8pm -> User visits XYZ.com... error is thrown (log of actions is captured)
  3. Aug 16th 10am -> Developer loads the logged actions into local version of XYZ.com (dev version)
  4. Redux Dev Tools replay the actions recreate the state to the point where the error happened for debugging

#How When an error is thrown it is captured by TrackJS. The users actions up to the error point get logged to a JSON file (via myjson.com). The error in TrackJS references the log file which can be downloaded and imported into a local environment via Redux Dev Tools.

  1. Dowload the reported file
  2. Import via the Redux Dev Tools
  3. The actions are automatically replayed to get back to the error state
  4. Debug

#Setup

  1. Update index.html enter your TrackJS token
  2. npm install
  3. npm start

*Sample Error Message*

alt text

#The Future? alt text

#Notes This hasn't been tested on a real app potential issue: @mdiordiev https://twitter.com/mdiordiev/status/764528409590501377

#Related Projects I'm not the only one looking into this if you know of other projects let me know.

#For more inspiration Check out @jrullmann https://medium.com/@jrullmann/redux-error-reports-concept-ab85b658f53e#.6z3oouu71

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.