Skip to main content

Flawless

Flawless is a simple Python framework developed at shopkick for detecting bugs in a production environment. Flawless traps exceptions and then sends an email to the developer responsible for causing the exception. Flawless integrates with git and uses git-blame to determine which developer to email.

Project website: http://shopkick.github.com/flawless/

Why You Should Use Flawless

  • Only sends 1 email per line of code. Even if a particular line of code causes thousands of exceptions, only one email will be sent.

  • Only emails 1 developer. Flawless uses git-blame to figure out which developer is responsible for a particular exception, and will only email that developer.

  • Flawless logs the values of every variable in the stack frame at the time the exception occurred. This makes debugging ten times faster.

  • Don’t report exceptions in old code. If you set report_only_after_minimum_date, then Flawless will only report exceptions caused by code modified after report_only_after_minimum_date.

  • Don’t alert on library code. You can mark certain files/functions as library code, and when an exception originates in those files/functions, the caller will be blamed for the error instead of the library code.

4 Step Setup Guide

  1. Install Flawless. After this step you should have an executable named flawless in your path.

    $> python setup.py install

  2. Setup the Flawless server. Go to the server which you want to host the Flawless backend. Then use the following command to start a short questionnaire to setup the server.

    $> flawless configure

  3. Start the Flawless server

    $> flawless start -conf path/to/flawless.cfg

  4. Integrate the Flawless client into your code. If you are running a WSGI application such as django or pylons/pyramid, simply add the flawless.client.middleware to your application. Otherwise you can wrap particular functions or entire classes by using flawless.client.decorators. View the examples directory for some actual code examples.

How it Works

The Flawless client wraps your code with a try/except block. When an exception is caught it then sends the entire traceback to the Flawless server. The Flawless server then aggregates exception reports from clients and figures out which line of code caused the exception. Once the line that caused the exception is identified, Flawless runs “git blame” to determine the email address of the developer that last touched that line of code. Flawless then sends the developer an email with the traceback.

Exceptions can be whitelisted if they are expected. To whitelist an exception you must specify the filename, function name, and the text from the line of code being whitelisted in the appropriate config file. Alternatively, exception emails include a link to automatically add an exception to the whitelist. It is possible to whitelist all exceptions from a particular function by leaving the line of code text blank. Likewise, an entire file can be whitelisted by leaving the line of code and function blank.

Server User Interface

/get_weekly_error_report - Shows all errors that happened this week. ses a leaderboard style format to show which developer is responsible for causing the most errors this week.

Parameters:
  timestamp - (optional) Specify which week you want to view. Default is the current week.
  include_known_errors - (optional) Include errors from config/known_errors. Default is False.
  include_modified_before_min_date - (optional) Include errors originating in code modified
  before flawless.cfg option "report_only_after_minimum_date". Default is False.

/check_health - Check if the server is up and running. Also displays server’s configuration parameters

/add_known_error - Webpage in which you can whitelist errors

/view_traceback - View the most recent traceback for a particular error

Parameters:
  filename - (required) Specify the filename in which the error occurred
  function_name - (required) Specify the name of the function in which the error occurred
  line_number - (required) Specify the line number on which the error occurred
  text - (required) Specify the full text that appears on line_number
  timestamp - (optional) Specify which week you want to view. Default is the current week.

Metadata

Release files for flawless 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flawless 0.4.5
File Size Uploaded
flawless-0.4.5.tar.gz 54.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for flawless 0.4.5
File Interpreter ABI Platform
flawless-0.4.5-py2.7.egg Legacy Egg format - - Details
flawless-0.4.5-py2-none-any.whl Python 2 none any Details

Total release size: 220.2 kB

Release files / flawless-0.4.5.tar.gz

Download URL flawless-0.4.5.tar.gz
Size 54.0 kB
Tags Source
SHA-256 checksum
How to use checksums
330ea8564e0e6b727068c76a055f59922d2ff37975efb7a627d4ee9c8b987bb6
BLAKE2b-256 checksum
How to use checksums
06b8b05c13abf22a77d960e91005f7718a25ce02ca98acd90c5450ed450af690
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1

Release files / flawless-0.4.5-py2.7.egg

Download URL flawless-0.4.5-py2.7.egg
Size 111.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
b5be04620de2ac7638fd45130a84c61e47cee378ed5b31bf0f30fd9be4605cbe
BLAKE2b-256 checksum
How to use checksums
61ea5304d50b5d96fd02d27e5adedd423bac17cc68948930d6aa630074774c11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1

Release files / flawless-0.4.5-py2-none-any.whl

Download URL flawless-0.4.5-py2-none-any.whl
Size 54.9 kB
Tags Python 2
SHA-256 checksum
How to use checksums
d84ab18a90114236286d04bf202c210e61ad2929e0a76bef8c42846f96aa9714
BLAKE2b-256 checksum
How to use checksums
a3d33827b48c8360748d275ba6279d231e8bd207a0974774128fb1acd510ec1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.1

Release history Release notifications | RSS feed

This release

0.4.5 This release

3 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

1 release file

0.3.2

3 release files

0.3.1

3 release files

0.3

3 release files

0.2.9

3 release files

0.2.8

3 release files

0.2.7

3 release files

0.2.6

3 release files

0.2.5

3 release files

0.2.4

3 release files

0.2.3

3 release files

0.2.2

3 release files

0.2.1

3 release files

0.2.0

3 release files

0.1.9

3 release files

0.1.8

3 release files

0.1.7

3 release files

0.1.6

3 release files

0.1.5

2 release files

0.1.4

1 release file

0.1.3

2 release files

0.1.2

2 release files

0.1.1

3 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page