2011-05-08 02:14:42 +02:00
|
|
|
"""
|
2011-10-07 19:57:45 +02:00
|
|
|
raven.conf.defaults
|
2011-10-10 23:57:41 +02:00
|
|
|
~~~~~~~~~~~~~~~~~~~
|
2011-09-11 20:08:49 +02:00
|
|
|
|
2011-05-08 02:14:42 +02:00
|
|
|
Represents the default values for all Sentry settings.
|
2011-09-11 20:08:49 +02:00
|
|
|
|
2012-10-12 19:45:54 +02:00
|
|
|
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
|
2011-09-11 20:08:49 +02:00
|
|
|
:license: BSD, see LICENSE for more details.
|
2011-05-08 02:14:42 +02:00
|
|
|
"""
|
2013-06-15 22:57:40 +02:00
|
|
|
from __future__ import absolute_import
|
2011-05-08 02:14:42 +02:00
|
|
|
|
|
|
|
import os
|
|
|
|
import os.path
|
|
|
|
import socket
|
|
|
|
|
2011-05-08 05:22:09 +02:00
|
|
|
ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir))
|
2011-05-08 02:14:42 +02:00
|
|
|
|
|
|
|
# This should be the full URL to sentries store view
|
2011-10-08 13:48:26 +02:00
|
|
|
SERVERS = None
|
2011-05-08 02:14:42 +02:00
|
|
|
|
2013-01-28 09:18:41 +01:00
|
|
|
TIMEOUT = 1
|
2011-05-08 02:14:42 +02:00
|
|
|
|
2011-10-07 21:54:42 +02:00
|
|
|
# TODO: this is specific to Django
|
2011-10-07 19:57:45 +02:00
|
|
|
CLIENT = 'raven.contrib.django.DjangoClient'
|
2011-05-08 02:14:42 +02:00
|
|
|
|
2012-10-19 16:33:53 +02:00
|
|
|
# Not all environments have access to socket module, for example Google App Engine
|
|
|
|
# Need to check to see if the socket module has ``gethostname``, if it doesn't we
|
|
|
|
# will set it to None and require it passed in to ``Client`` on initializtion.
|
|
|
|
NAME = socket.gethostname() if hasattr(socket, 'gethostname') else None
|
2011-05-08 02:14:42 +02:00
|
|
|
|
2011-10-14 01:56:41 +02:00
|
|
|
# Superuser key -- will be used if set, otherwise defers to
|
|
|
|
# SECRET_KEY and PUBLIC_KEY
|
|
|
|
KEY = None
|
|
|
|
|
|
|
|
# Credentials to authenticate with the Sentry server
|
|
|
|
SECRET_KEY = None
|
|
|
|
PUBLIC_KEY = None
|
|
|
|
|
2011-05-08 02:14:42 +02:00
|
|
|
# We allow setting the site name either by explicitly setting it with the
|
|
|
|
# SENTRY_SITE setting, or using the django.contrib.sites framework for
|
|
|
|
# fetching the current site. Since we can't reliably query the database
|
|
|
|
# from this module, the specific logic is within the SiteFilter
|
|
|
|
SITE = None
|
|
|
|
|
2011-09-06 19:09:27 +02:00
|
|
|
# The maximum number of elements to store for a list-like structure.
|
2011-05-08 02:14:42 +02:00
|
|
|
MAX_LENGTH_LIST = 50
|
2011-09-06 19:09:27 +02:00
|
|
|
|
|
|
|
# The maximum length to store of a string-like structure.
|
2012-04-19 06:40:37 +02:00
|
|
|
MAX_LENGTH_STRING = 400
|
2011-05-08 02:39:20 +02:00
|
|
|
|
2011-09-04 03:00:13 +02:00
|
|
|
# Automatically log frame stacks from all ``logging`` messages.
|
2011-09-03 12:12:31 +02:00
|
|
|
AUTO_LOG_STACKS = False
|
2011-10-16 21:05:59 +02:00
|
|
|
|
2014-03-11 10:32:46 +01:00
|
|
|
# Collect locals variables
|
|
|
|
CAPTURE_LOCALS = True
|
2014-03-07 17:07:22 +01:00
|
|
|
|
2011-10-16 21:05:59 +02:00
|
|
|
# Client-side data processors to apply
|
|
|
|
PROCESSORS = (
|
2012-02-02 21:54:41 +01:00
|
|
|
'raven.processors.SanitizePasswordsProcessor',
|
2011-12-29 12:04:29 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
# Default Project ID
|
|
|
|
PROJECT = 1
|
2014-02-22 23:13:38 +01:00
|
|
|
|
2014-06-03 02:35:02 +02:00
|
|
|
try:
|
|
|
|
# Try for certifi first since they likely keep their bundle more up to date
|
|
|
|
import certifi
|
|
|
|
CA_BUNDLE = certifi.where()
|
|
|
|
except ImportError:
|
|
|
|
CA_BUNDLE = os.path.join(ROOT, 'data', 'cacert.pem')
|