From 1cd51839b2a9fd66a6f9027bbe18015918bb2de3 Mon Sep 17 00:00:00 2001 From: Andy Dirnberger Date: Thu, 18 Feb 2016 23:32:26 -0500 Subject: [PATCH] Add the initial documentation --- docs/index.rst | 82 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 7 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 7f6570b..de6ceef 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 `_ into a +`Henson `_ 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: @@ -19,4 +88,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` -