Skip to content

Commit

Permalink
Add the initial documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dirn committed Feb 19, 2016
1 parent a475306 commit 1cd5183
Showing 1 changed file with 75 additions and 7 deletions.
82 changes: 75 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,79 @@
.. Henson-Sentry documentation master file, created by
sphinx-quickstart on Sat Jan 23 22:08:23 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
=============
Henson-Sentry
=============

Welcome to Henson-Sentry's documentation!
=========================================
Henson-Sentry is a library that helps to easily incorporate logging to
`Sentry <https://sentry.readthedocs.org>`_ into a
`Henson <https://henson.readthedocs.org>`_ application.

Installation
============

Henson-Sentry can be installed with::

$ python -m pip install Henson-Sentry

Configuration
=============

The following configuration settings can be added to the application.

+------------------------------+----------------------------------------------+
| ``SENTRY_DSN`` | The data source name used to identify that |
| | Sentry instance to which to send the logs. |
+------------------------------+----------------------------------------------+
| ``RAVEN_IGNORE_EXCEPTIONS`` | Exception types that will be ignored when |
| | sending exceptions to Sentry. |
+------------------------------+----------------------------------------------+
| ``SENTRY_AUTO_LOG_STACKS`` | Whether or not to automatically log full |
| | stack traces. Default: ``False`` |
+------------------------------+----------------------------------------------+
| ``SENTRY_EXCLUDE_PATHS`` | Module prefixes that will be ignored when |
| | attempting to discover from which function |
| | the exception originated. Default: ``()`` |
+------------------------------+----------------------------------------------+
| ``SENTRY_INCLUDE_PATHS`` | Module prefixes that will be included when |
| | attempting to discover from which function |
| | the exception originated. Default ``()`` |
+------------------------------+----------------------------------------------+
| ``SENTRY_MAX_LENGTH_LIST`` | The maximum number of items a list-like |
| | container will store. Default ``50`` |
+------------------------------+----------------------------------------------+
| ``SENTRY_MAX_LENGTH_STRING`` | The maximum number of characters of a string |
| | that will be stored. Default ``400`` |
+------------------------------+----------------------------------------------+
| ``SENTRY_NAME`` | The name to use to identify the application. |
| | If no value is provided, the application's |
| | name will be used. |
+------------------------------+----------------------------------------------+
| ``SENTRY_PROCESSORS`` | A list of processors to apply to events |
| | before sending them to Sentry. |
+------------------------------+----------------------------------------------+
| ``SENTRY_RELEASE`` | The version of the application. Default |
| | ``None`` |
+------------------------------+----------------------------------------------+
| ``SENTRY_SITE_NAME`` | The name used to identify the client. |
| | Default ``None`` |
+------------------------------+----------------------------------------------+
| ``SENTRY_TAGS`` | A mapping of key-value pairs that will be |
| | associated with all events. Default ``None`` |
+------------------------------+----------------------------------------------+
| ``SENTRY_TRANSPORT`` | The HTTP transport class that will be used |
| | to transmit events. Default ``None`` |
+------------------------------+----------------------------------------------+

Usage
=====

.. code::
from henson import Application
from henson_sentry import Sentry
app = Application('application-with-sentry')
app.settings['SENTRY_DSN'] = 'https://******@app.getsentry.com/1234'
Sentry(app)
Contents:

Expand All @@ -19,4 +88,3 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

0 comments on commit 1cd5183

Please sign in to comment.