All Projects → lobocv → Crashreporter

lobocv / Crashreporter

Licence: mit
Store and send crash reports directly to the devlopers

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Crashreporter

Grpcc
A gRPC cli interface for easy testing against gRPC servers
Stars: ✭ 1,078 (+1462.32%)
Mutual labels:  developer-tools
Git Notify
🙉 📣 Communicate important updates to your team via git commit messages
Stars: ✭ 1,091 (+1481.16%)
Mutual labels:  developer-tools
Artemis Dev Tool
An Apollo GraphQL Query Schema Testing Tool
Stars: ✭ 66 (-4.35%)
Mutual labels:  developer-tools
Dotfiles
🖥️ Automated Configuration, Preferences and Software Installation for macOS
Stars: ✭ 1,103 (+1498.55%)
Mutual labels:  developer-tools
Xxv
The XXV visual hex viewer for the terminal.
Stars: ✭ 61 (-11.59%)
Mutual labels:  developer-tools
Tables To Go
convert your database tables to structs easily
Stars: ✭ 62 (-10.14%)
Mutual labels:  developer-tools
Spm Agent Nodejs
NodeJS Monitoring Agent
Stars: ✭ 51 (-26.09%)
Mutual labels:  developer-tools
Psync
Synchronize project based on rsync; support watching changes and sync automatically
Stars: ✭ 68 (-1.45%)
Mutual labels:  developer-tools
Logvac
Simple, lightweight, api-driven log aggregation service with realtime push capabilities and historical persistence.
Stars: ✭ 61 (-11.59%)
Mutual labels:  developer-tools
Jumbune
Jumbune, an open source BigData APM & Data Quality Management Platform for Data Clouds. Enterprise feature offering is available at http://jumbune.com. More details of open source offering are at,
Stars: ✭ 64 (-7.25%)
Mutual labels:  developer-tools
Log Viewer
Web UI to viewing logs
Stars: ✭ 59 (-14.49%)
Mutual labels:  developer-tools
Wago
Automate the actions you do after saving code.
Stars: ✭ 60 (-13.04%)
Mutual labels:  developer-tools
Whatthegem
Ruby gem information, stats and usage for your terminal
Stars: ✭ 63 (-8.7%)
Mutual labels:  developer-tools
Http Prompt
An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie
Stars: ✭ 8,329 (+11971.01%)
Mutual labels:  developer-tools
Prequel
Prequel for Laravel. Clear and concise database management.
Stars: ✭ 1,141 (+1553.62%)
Mutual labels:  developer-tools
Linessorter Xcode Extension
Xcode Extension that helps you keep your import statements and long code lists organized and uniform
Stars: ✭ 54 (-21.74%)
Mutual labels:  developer-tools
Trymodule
➰ It's never been easier to try nodejs modules!
Stars: ✭ 1,115 (+1515.94%)
Mutual labels:  developer-tools
St
ST - Struct Tagger - Tags your structs so you don't have to, saving you development time and encoding/decoding sanity.
Stars: ✭ 68 (-1.45%)
Mutual labels:  developer-tools
Toc
🚩 TOC, zero configuration table of content generator for Markdown files, create table of contents from any Markdown file with ease.
Stars: ✭ 66 (-4.35%)
Mutual labels:  developer-tools
Deb Dev Machine
Quickly install common Developer tools, IDE's & Services on Debian 9
Stars: ✭ 63 (-8.7%)
Mutual labels:  developer-tools

CrashReporter

CrashReporter creates reports from the traceback if your python code crashes. The reports can be uploaded directly to the developers via email or web server. If no internet connection is available, crash reporter stores offline reports and later sends them when possible.

Features

Features of crashreporter include:

- Uploading of crash reports via email or to a web server (HQ).
- Offline crash reporting that stores crash reports until they are uploaded.
- Traceback and variable inspection output

Installation

To install:

pip install crashreporter

Usage

Implementing the crash reporter is easy. Just create a CrashReporter object. Configure the SMTP or HQ accounts for uploading of reports (optional) and you are good to go!

In the following example, we wil create a Person class that has an optional age attribute. We will then create two Person objects, one with an age and one without. When we attempt to combine their ages we get the following error:

TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

example.py

    
    from crashreporter import CrashReporter
    
    class Person(object):
    
        def __init__(self, name, age=None):
            self.name = name
            self.age = age
    
    def combine_ages(person_a, person_b):
        a_local_variable = 134
        return person_a.age + person_b.age, Person.__name__
    
    if __name__ == '__main__':
        # Note I have used a configuration file for setting up SMTP and HQ accounts but you can also call functions
        # cr.setup_smtp() and cr.setup_hq() with your credentials to configure SMTP/HQ respectively.
        cr = CrashReporter(report_dir='/home/calvin/crashreporter',
                           check_interval=10,
                           config='./crashreporter.cfg')
    
        cr.application_name = 'My App'
        cr.application_version = '1.1.350'
    
        calvin = Person('calvin', age=25)
        bob = Person('bob')
        combine_ages(calvin, bob)
    
        while 1:
            pass

When the crash occurs, the crash reporter will attempt to send it by email or upload it to the HQ server, if both methods fail, the crash is written to file in report_dir. The next time the script is run, the crash reporter will look for any offline reports and attempt to send them every check_interval seconds. After a sucessful upload, the stored reports are deleted.

Configuration File

If you don't want to keep your SMTP and HQ credentials in your scripts you can alternatively use a configuration file. Simple pass the path to the configuration file as the config argument in CrashReporter or call the load_configuration(path) method with the path. The format of the configuration file should have two sections, SMTP and HQ. Under each section are parameters that are passed to the setup_smtp and setup_ftp functions:

Example:

[SMTP]
user = [email protected]
passwd = mypasswordissupersecret
recipients = [email protected], [email protected]
host = smtp.gmail.com
port = 587

[HQ]
api_key = ar923086wkjsldl235dfgdf32
server = http://www.crashreporter-hq.com

Attributes

The CrashReporter has several attributes that can be changed:

offline_report_limit:
        The maximum number of offline reports to save before overwriting
        the oldest report.

application_version:
        Application version as a string to be included in the report.

application_name:
        Application name as a string to be included in the report.

source_code_line_limit:
        The number of source code lines to include before and after the error
        as a tuple (before, after)

Example Report

alt tag

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].