GithubHelp home page GithubHelp logo

dcramer / sentry-old Goto Github PK

View Code? Open in Web Editor NEW
40.0 3.0 4.0 2.55 MB

(In Development) Sentry 2.x is a realtime event logging and aggregation platform

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

Shell 2.07% JavaScript 5.09% Python 92.84%

sentry-old's Introduction

Sentry

SENTRY 2.0 (this) IS IN DEVELOPMENT AND SHOULD NOT BE USED IN PRODUCTION

Sentry provides you with a generic interface to view and interact with your error logs. By default, it will record various events to a datastore. With this it allows you to interact and view near real-time information to discover issues and more easily trace them in your application.

(The next chunk is a lie, but planned)

Built-in support includes:

  • Drop-in Django support
  • WSGI middleware for error logging
  • Query logging for psycopg2 and MySQLdb
  • logging and logbook modules

Issue tracker: http://github.com/dcramer/django-sentry/issues

Basic Docs

We'll move all of this into the Sphinx docs once APIs are finalized.

Running tests

Sentry uses Nose, which will automatically be installed (along with unittest2) if you use the test command.

mkvirtualenv sentry
python setup.py test

Running sentry.web

The server component of Sentry, called sentry.web, can be run with the following command:

mkvirtualenv sentry
python setup.py develop
sentry start --no-daemon --debug

Client API

The client is the core of Sentry, which is composed of the sentry namespace, and its many submodules. There are a two key things that make up the client:

  • sentry.client
  • sentry.events

These components are also used within sentry.web as well.

To capture an error, Sentry provides the capture function:

from sentry import capture
capture('sentry.events.Exception', exc_info=exc_info)

For built-in events, you can drop the module namespace:

from sentry import capture
capture('Exception', exc_info=exc_info)

One of the big changes from Sentry 1.x to 2.x, is the ability to record durations (in ms) with events:

from sentry import capture
capture('Query', query='SELECT * FROM table', engine='psycopg2', time_spent=36)

The other major change, is that labels like "logger", and "server" are now part of the tagging architecture:

from sentry import capture
capture('Message', message='hello world', tags=[('logger', 'root'), ('level', 'error'), ('url', 'http://example.com')])

Filter API

The filter API is designed to allow dynamic filters based on tags. They are composed of two pieces: a processor and a renderer. The renderer simply tells Sentry how it needs to be displayed in the filter list (e.g. a select widget with FOO choices, a search input, etc).

The majority of this code lies within sentry.web.filters, and are specified as part of the SLICES runtime configuration.

What's Left?

This is a rough list of features/APIs which need to be completed (some of this is better described in the issue tracker):

  • Runtime validation of settings (ensure events and filters are valid importables, etc.)
  • Exception event handler needs to have an intelligent hash
  • Processor API (for post-processing messages before they get sent to the server)
    • Should be an ordered tuple specified in config
    • Should be able to manipulate all of data (so you can clean messages, or add additional metadata)
  • Filter API
    • Needs to handle sorting+filtering with denormalized indexes
  • Plugin API
  • Dashboard view needs finalized
    • Need to properly index/query on sort+tag combinations
    • Implement pagination
  • Should consider supporting better interval dashboards. e.g. last 24 hours, vs last 15 minutes
  • Django Integration (some draft code is present)
  • SQLAlchemy Backend
  • Test coverage
    • Models and Backends
    • Clients
  • Decide on final version of client authentication API
    • Probably don't need it to be so secure (nonce is extra load)
    • Support should be considered for having multiple "users". A good example use case is if a consulting firm uses a single Sentry server and has many clients, but then decides one client's access needs revoked from recording to the logger.
  • Make reporting extendable
    • The email reporting which was available in Sentry 1.x should simply be a builtin reporting option.
    • Add an IRC extension?
    • Add a network Growl extension?
    • Add an IM extension?

sentry-old's People

Contributors

dcramer avatar dz avatar mfrasca avatar ckj avatar justquick avatar kjagiello avatar dokterbob avatar acdha avatar buriy avatar brosner avatar dfeeney avatar jurecuhalev avatar treyhunner avatar thraxil avatar bryanchow avatar dryan avatar tail avatar jkozera avatar stefanfoulis avatar vitaliyf avatar andrewwatts avatar benhodgson avatar bretthoerner avatar carmi avatar gabesmed avatar kronuz avatar harmv avatar jaylett avatar jsma avatar niran avatar

Stargazers

mohammad avatar Angus H. avatar ldng avatar  avatar James Pacileo avatar Brian S. Corbin avatar  avatar Victor Godoy Poluceno avatar Douglas Soares de Andrade avatar Val N. avatar Henning Kage avatar Raphaël Slinckx avatar Gianluca Bargelli avatar Andrew Ladouceur avatar Oleg Fedoseev avatar Jake Almer avatar Meng avatar Josh Mize avatar Daniel Rech avatar Brian Dorsey avatar Kenneth Reitz avatar Morgan Craft avatar Andreas Madsack avatar PA Parent avatar Vasil Vangelovski avatar Carl Meyer avatar Sasha Vladimirskiy avatar Sean Bleier avatar Dougal Matthews avatar Andrew Gwozdziewycz avatar Remco Wendt avatar  avatar Lucas Hrabovsky avatar  avatar  avatar Jamie Matthews avatar Régis Gaidot avatar Bruno Melo avatar Doug Tangren avatar Maciek Szczesniak avatar

Watchers

 avatar James Cloos avatar  avatar

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.