Giter Site home page Giter Site logo

sonus21 / error-tracker Goto Github PK

View Code? Open in Web Editor NEW
23.0 23.0 10.0 1.41 MB

Full featured error tracking module for Python

Home Page: https://error-tracker.readthedocs.io/en/latest/

License: BSD 3-Clause "New" or "Revised" License

Python 91.25% HTML 8.67% Shell 0.08%
django django-application error-monitoring error-reporting exception-reporting flask flask-application flask-extensions python python2 python3

error-tracker's Introduction

Hi🀝, I'm Sonu

I am a software engineer mostly working on the backend with a passion for creating highly scalable apps that operate smoothly without downtime or near to zero downtime, I believe in five nines or more nines.

My approach to software development is centered around simplicity and scalability, prioritizing meticulous architecture and modularity. When building software, I pay close attention to factors such as latency, scalability, handling edge cases, and maintaining high code quality. With my extensive experience, I have successfully worked with and managed numerous microservices, some of which have handled millions of requests per minute.

🌱 Backend Developer 🌱

  • πŸ’¬ Ask me about anything, I am happy to help.
  • πŸ“« Drop me mail at [email protected] πŸ“«

Connect with me

Sonu's Twitter Sonu's LinkedIn Sonu's Medium Blog

Languages and Tools

Programming Language

Java Go Python Ruby PHP CPP Bash

Backend Framework

Spring Boot Flask Django Rails

Database

MySQL PostgreSQL Redis MongoDB DynamoDB ElasticSearch

Service communication Pattern

RESTful API gRPC GraphQL Event Driven

Messaging Libraries

MQTT NATS Websocket XMPP

Asynchronous Processing

SNS SQS Redis Sidekiq Apache Kafka RabbitMQ

Monitoring & Alerting

Grafana Promotheus DataDog Newrelic Kibana (ELK)

Version Control

Git Perforce

IDE

Intellij Idea Pycharm

Platform/OS

Linux MacOS Docker Kubernetes

CI/CD Pipeline

Jenkins GoCD ArgoCD Travis CI Circle CI

Cloud Provider

AWS Google Azure

If you like what I do, maybe consider buying me a coffee/tea πŸ₯ΊπŸ‘‰πŸ‘ˆ Buy Me A Coffee

πŸ“Š My Github Stats

sonus21

sonus21

sonus21

error-tracker's People

Contributors

alanparente avatar jeduardo211 avatar sonus21 avatar tboulogne avatar xangcastle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

error-tracker's Issues

Record all errors (do not overwrite)

At the moment, errors are overwritten. A better approach would be to simply group similar errors together (Sentry way) and allow to navigate from one to another.

UserWarning: APP_ERROR_DB_MODEL is not set using default model

/error_tracker/django/init.py:28: UserWarning: APP_ERROR_DB_MODEL is not set using default model
warnings.warn("APP_ERROR_DB_MODEL is not set using default model")
/error_tracker/libs/utils.py:121: UserWarning: Default Masking module will be used
warnings.warn(message)
/error_tracker/libs/utils.py:121: UserWarning: Default Notification module will be used
warnings.warn(message)
/error_tracker/libs/utils.py:121: UserWarning: Default ContextBuilder module will be used
warnings.warn(message)

NotificationMixin not working Without set APP_ERROR_RECIPIENT_EMAIL and APP_ERROR_EMAIL_SENDER

I create the class on django

class Notifier(NotificationMixin):
    def notify(self, request, exception,
               email_subject=None,
               email_body=None,
               from_email=None,
               recipient_list=None):
            BaseSlackNotification.send_notification(f"{exception}\n {request}",
                                                settings.SLACK_NEW_ERR0R)

I put on settings
APP_ERROR_NOTIFICATION_MODULE = "apps.commons.slack_notifications.Notifier"
and not works, in debugger never stop on method on exception, but the except show's on error page

Simplify error reporting

Take Sentry SDK as a good example of such.

Capture errors

https://docs.sentry.io/platforms/python/#capturing-errors

from sentry_sdk import capture_exception

try:
    a_potentially_failing_function()
except Exception as e:
    # Alternatively the argument can be omitted
    capture_exception(e)

Capture messages

https://docs.sentry.io/error-reporting/capturing/?platform=python#capturing-messages

from sentry_sdk import capture_message

capture_message('Something went wrong')

Extra context

https://docs.sentry.io/platforms/python/#extra-context

from sentry_sdk import configure_scope

with configure_scope() as scope:
    scope.set_extra("character_name", "Mighty Fighter")

Error: ModuleNotFoundError: No module named 'flask

Hi, I tried to use this with Django and in the moment in put 'error_tracker.DjangoErrorTracker' in settings.py I have the error below.

File ".../lib/python3.7/site-packages/error_tracker/__init__.py", line 14, in <module>
    from error_tracker.flask import *
File ".../lib/python3.7/site-packages/error_tracker/flask/__init__.py", line 10, in <module>
    from .flask_error import AppErrorTracker
File ".../lib/python3.7/site-packages/error_tracker/flask/flask_error.py", line 15, in <module>
    from flask import _request_ctx_stack as stack
ModuleNotFoundError: No module named 'flask'

Thank you.

Add support for Django REST Framework

The class DefaultDjangoContextBuilder of the error_tracker.django.utils needs some extensions. In particular, in case of Django REST Framework (DRF), the request instance has no POST (request.POST is empty dict). Instead data is stored in request.data. You could simply check, if it's instance of rest_framework.request.Request, then handle as DRF request, otherwise standard Django.

Extend Django ErrorModel

Hi, I saw on the docs that I can set a model to replace the default ErrorModel but I need to implement all abstract methods. And if I want to extend the ErrorModel, this would be possible?

All variables in traceback are `None`

I used the 3.0.0 version of error -tracker for Django 4.2.1 for some time. In my admin in all traceback, I see None instead of the actual value of variables.

I searched in the documentation but don't see anything about It. I don't have any masking variables set.

Zrzut ekranu 2023-07-16 o 12 50 48

Change break migrations

Hello,

the change

dependencies = [
        ('django', '0001_initial'),
    ]
to
 dependencies = [
        ('error_tracker', '0001_initial'),
    ]

made migrations broken.

The error message

django.db.migrations.exceptions.NodeNotFoundError: Migration django.0002_auto_20201018_1311 dependencies reference nonexistent parent node ('error_tracker', '0001_initial')

Regards

Reduce dependencies?

Currently, this package depends on Flask, Django and Django-rest-framework, but is that really needed? Typically, when this library is used with django and/or django-rest-framework or Flask, then the application will already depend on those packages and error-tracker could just import them.

Typically an application will not use both Flask and Django at the same time, so this installs a bunch of packages that are never used.

Maybe the dependencies can be made optional using setup.py's "extra" feature, or just removed altogether (with the responsibility for installing these moved to the application). The latter might need some changes in the code (haven't checked) to ensure things are only imported when actually needed and/or to have a graceful fallback if imports are not available.

Error on warnings library

To be raised an exception must derive from BaseException

File "/.../lib/python3.8/site-packages/error_tracker/django/__init__.py", line 43, in get_exception_model
    raise warnings.warn(
TypeError: exceptions must derive from BaseException

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.