-
Notifications
You must be signed in to change notification settings - Fork 1
/
sentry.conf.py
140 lines (117 loc) · 3.54 KB
/
sentry.conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
import os
from decouple import config
from sentry.conf.server import *
# better set these
SENTRY_URL_PREFIX = config('SENTRY_URL_PREFIX', default=None)
SENTRY_ADMIN_EMAIL = config('SENTRY_ADMIN_EMAIL', default=None)
SENTRY_KEY = config('SENTRY_KEY')
SENTRY_ALLOW_REGISTRATION = config('SENTRY_ALLOW_REGISTRATION ', default=False, cast=bool)
# Set this to false to require authentication
SENTRY_PUBLIC = False
SENTRY_ALLOW_PUBLIC_PROJECTS = False
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.environ.get('POSTGRESQL_NAME'),
'USER': os.environ.get('POSTGRESQL_USER'),
'PASSWORD': os.environ.get('POSTGRESQL_PASS'),
'HOST': os.environ.get('DB_PORT_5432_TCP_ADDR'),
'PORT': os.environ.get('DB_PORT_5432_TCP_PORT')
}
}
SENTRY_CACHE = 'sentry.cache.django.DjangoCache'
# You should configure the absolute URI to Sentry.
# It will attempt to guess it if you don't
# but proxies may interfere with this.
# SENTRY_URL_PREFIX = 'http://sentry.example.com' # No trailing slash!
SENTRY_WEB_HOST = '0.0.0.0'
SENTRY_WEB_PORT = 9000
SENTRY_WEB_OPTIONS = {
'workers': 3, # the number of gunicorn workers
}
ALLOWED_HOSTS = '*'
SENTRY_ALLOWED_HOSTS = '*'
# Mail server configuration
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = ''
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_USE_TLS = False
# http://twitter.com/apps/new
# It's important that input a callback URL, even if its useless.
# We have no idea why, consult Twitter.
TWITTER_CONSUMER_KEY = ''
TWITTER_CONSUMER_SECRET = ''
# http://developers.facebook.com/setup/
FACEBOOK_APP_ID = ''
FACEBOOK_API_SECRET = ''
# http://code.google.com/apis/accounts/docs/OAuth2.html#Registering
GOOGLE_OAUTH2_CLIENT_ID = ''
GOOGLE_OAUTH2_CLIENT_SECRET = ''
# https://github.com/settings/applications/new
GITHUB_APP_ID = ''
GITHUB_API_SECRET = ''
# https://trello.com/1/appKey/generate
TRELLO_API_KEY = ''
TRELLO_API_SECRET = ''
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'handlers': {
'console': {
'class': 'logging.StreamHandler'
},
'sentry': {
'level': 'ERROR',
'class': 'raven.contrib.django.handlers.SentryHandler',
},
'file':{
'level':'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'maxBytes': 4196,
'backupCount': 5,
'filename': '/var/log/sentry_master.log',
'mode': 'a',
},
},
'formatters': {
'client_info': {
'format': '%(name)s %(levelname)s %(project_slug)s/%(team_slug)s %(message)s'
}
},
'root': {
'level': 'WARNING',
'handlers': ['file', 'console', 'sentry'],
},
'loggers': {
'sentry': {
'level': 'ERROR',
'handlers': ['file', 'console', 'sentry'],
'propagate': True,
},
'sentry.coreapi': {
'formatter': 'client_info',
},
'sentry.errors': {
'level': 'ERROR',
'handlers': ['file', 'console'],
'propagate': True,
},
'static_compiler': {
'level': 'INFO',
},
'django.request': {
'level': 'ERROR',
'handlers': ['file', 'console'],
'propagate': True,
},
'toronado.cssutils': {
'level': 'ERROR',
'propagate': True,
},
}
}
INSTALLED_APPS += (
'sentry_slack',
)