Package: error-tracker
Full featured error tracking module for Python apps supports Flask and DjangoIntroductionErrorTracker is a batteries-included app and extensions for python app, that can track errors, send notification, mask sensitive data and capture frames data.It plays nicely withDjangoandFlaskSimple to use  extension that lets you add error recording interfaces to Python applications.
It’s implemented in such a way that the developer has total control of the resulting application.Out-of-the-box, Error Tracker plays nicely with various ORM’s, includingSQLAlchemy,MongoEngine,Django ORMIt also boasts a simple Model management interface.The biggest feature of ErrorTracker is flexibility. To start off with you can create a very simple application in no time,
with exception monitor enabled, but then you can go further and customize different aspects.ErrorTracker is an active project, well-tested and production ready.InstallationTo install ErrorTracker, simply:pip install error-trackerFeaturesSensitive data( likepassword,secret) MaskingRecord all the frames ( frame data are stored in JSON format so that it can be analyzed later)Unique URL generationNumber of times the exception occurred and first/last time of exceptionSending notifications with exception detailsRecord different types of exception like 500 or 404 etcRaise or update ticket in Jira/Bugzilla etc by ticketing interface.UsageFlask App configuration...
APP_ERROR_SEND_EMAIL = True
APP_ERROR_RECIPIENT_EMAIL = ('example@example.com',)
APP_ERROR_SUBJECT_PREFIX = "Server Error"
APP_ERROR_EMAIL_SENDER = 'user@example.com'app.pyfrom flask import Flask
from flask_mail import Mail
import settings
from error_tracker import AppErrorTracker, NotificationMixin
from flask_sqlalchemy import SQLAlchemy
...
app = Flask(__name__)
app.config.from_object(settings)
db = SQLAlchemy(app)
class Notifier(Mail, NotificationMixin):
    def notify(self, request, exception,
               email_subject=None,
               email_body=None,
               from_email=None,
               recipient_list=None):
        message = Message(email_subject, recipient_list, email_body, sender=from_email)
        self.send(message)
mailer = Notifier(app=app)
error_tracker = AppErrorTracker(app=app, db=db, notifier=mailer)

....

....
# Record exception when 404 error code is raised
@app.errorhandler(403)
def error_403(e):
    error_tracker.capture_exception()
    # any custom logic

# Record error using decorator
@app.errorhandler(500)
@error_tracker.track_exception
def error_500(e):
    # some custom logic
....Django App UsageWe need to update settings.py file asAdd app to installed apps listAdd Middleware for exception tracking. This should be added at the end so that it can process exception 1st in the middleware call stack.Other configs related to notificationSample Code...
APP_ERROR_RECIPIENT_EMAIL = ('example@example.com',)
APP_ERROR_SUBJECT_PREFIX = "Server Error"
APP_ERROR_EMAIL_SENDER = 'user@example.com'

INSTALLED_APPS = [
    ...
    'error_tracker.DjangoErrorTracker'
]
MIDDLEWARE = [
    ...
    'error_tracker.django.middleware.ExceptionTrackerMiddleWare'
]DocumentationsThis has got extensive document browse athttps://error-tracker.readthedocs.io/en/latest/All docs are indocs/sourceAnd if you want to preview any.rstsnippets that you may want to contribute, go tohttp://rst.ninjs.org/.ExamplesSeveral usage examples are included in the/testsfolder. Please feel free to add your own examples, or improve
on some of the existing ones, and then submit them via GitHub as apull-request.You can see some of these examples in action athttps://github.com/sonus21/error-tracker/tree/master/examplesTo run the examples on your local environment, one at a time, do something like:cd error-tracker/examplesDjango:cd error-tracker/examples
cd DjangoSample
python manage.py runserverFlask:cd flask-sample
python app.pyTestsTo run the tests, from the project directory, simply:pip install -r requirements-dev.txt
bash run-tests.shYou should see output similar to:.............................................
----------------------------------------------------------------------
Ran 31 tests in 1.144s

OKContributionYou’re most welcome to raise pull request or fixes.