##// END OF EJS Templates
Merge stable
Mads Kiilerich -
r6340:d89d586b merge default
parent child Browse files
Show More
@@ -391,59 +391,59 b' beaker.session.secret = development-not-'
391 ############################
391 ############################
392
392
393 ####################
393 ####################
394 ### [errormator] ###
394 ### [appenlight] ###
395 ####################
395 ####################
396
396
397 ## Errormator is tailored to work with Kallithea, see
397 ## AppEnlight is tailored to work with Kallithea, see
398 ## http://errormator.com for details how to obtain an account
398 ## http://appenlight.com for details how to obtain an account
399 ## you must install python package `errormator_client` to make it work
399 ## you must install python package `appenlight_client` to make it work
400
400
401 ## errormator enabled
401 ## appenlight enabled
402 errormator = false
402 appenlight = false
403
403
404 errormator.server_url = https://api.errormator.com
404 appenlight.server_url = https://api.appenlight.com
405 errormator.api_key = YOUR_API_KEY
405 appenlight.api_key = YOUR_API_KEY
406
406
407 ## TWEAK AMOUNT OF INFO SENT HERE
407 ## TWEAK AMOUNT OF INFO SENT HERE
408
408
409 ## enables 404 error logging (default False)
409 ## enables 404 error logging (default False)
410 errormator.report_404 = false
410 appenlight.report_404 = false
411
411
412 ## time in seconds after request is considered being slow (default 1)
412 ## time in seconds after request is considered being slow (default 1)
413 errormator.slow_request_time = 1
413 appenlight.slow_request_time = 1
414
414
415 ## record slow requests in application
415 ## record slow requests in application
416 ## (needs to be enabled for slow datastore recording and time tracking)
416 ## (needs to be enabled for slow datastore recording and time tracking)
417 errormator.slow_requests = true
417 appenlight.slow_requests = true
418
418
419 ## enable hooking to application loggers
419 ## enable hooking to application loggers
420 #errormator.logging = true
420 #appenlight.logging = true
421
421
422 ## minimum log level for log capture
422 ## minimum log level for log capture
423 #errormator.logging.level = WARNING
423 #appenlight.logging.level = WARNING
424
424
425 ## send logs only from erroneous/slow requests
425 ## send logs only from erroneous/slow requests
426 ## (saves API quota for intensive logging)
426 ## (saves API quota for intensive logging)
427 errormator.logging_on_error = false
427 appenlight.logging_on_error = false
428
428
429 ## list of additional keywords that should be grabbed from environ object
429 ## list of additional keywords that should be grabbed from environ object
430 ## can be string with comma separated list of words in lowercase
430 ## can be string with comma separated list of words in lowercase
431 ## (by default client will always send following info:
431 ## (by default client will always send following info:
432 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
432 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
433 ## start with HTTP* this list be extended with additional keywords here
433 ## start with HTTP* this list be extended with additional keywords here
434 errormator.environ_keys_whitelist =
434 appenlight.environ_keys_whitelist =
435
435
436 ## list of keywords that should be blanked from request object
436 ## list of keywords that should be blanked from request object
437 ## can be string with comma separated list of words in lowercase
437 ## can be string with comma separated list of words in lowercase
438 ## (by default client will always blank keys that contain following words
438 ## (by default client will always blank keys that contain following words
439 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
439 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
440 ## this list be extended with additional keywords set here
440 ## this list be extended with additional keywords set here
441 errormator.request_keys_blacklist =
441 appenlight.request_keys_blacklist =
442
442
443 ## list of namespaces that should be ignores when gathering log entries
443 ## list of namespaces that should be ignores when gathering log entries
444 ## can be string with comma separated list of namespaces
444 ## can be string with comma separated list of namespaces
445 ## (by default the client ignores own entries: errormator_client.client)
445 ## (by default the client ignores own entries: appenlight_client.client)
446 errormator.log_namespace_blacklist =
446 appenlight.log_namespace_blacklist =
447
447
448 ################
448 ################
449 ### [sentry] ###
449 ### [sentry] ###
@@ -383,65 +383,65 b' beaker.session.secret = ${uuid()}'
383 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
383 #beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea
384 #beaker.session.table_name = db_session
384 #beaker.session.table_name = db_session
385
385
386 %if error_aggregation_service == 'errormator':
386 %if error_aggregation_service == 'appenlight':
387 <%text>############################</%text>
387 <%text>############################</%text>
388 <%text>## ERROR HANDLING SYSTEMS ##</%text>
388 <%text>## ERROR HANDLING SYSTEMS ##</%text>
389 <%text>############################</%text>
389 <%text>############################</%text>
390
390
391 <%text>####################</%text>
391 <%text>####################</%text>
392 <%text>### [errormator] ###</%text>
392 <%text>### [appenlight] ###</%text>
393 <%text>####################</%text>
393 <%text>####################</%text>
394
394
395 <%text>## Errormator is tailored to work with Kallithea, see</%text>
395 <%text>## AppEnlight is tailored to work with Kallithea, see</%text>
396 <%text>## http://errormator.com for details how to obtain an account</%text>
396 <%text>## http://appenlight.com for details how to obtain an account</%text>
397 <%text>## you must install python package `errormator_client` to make it work</%text>
397 <%text>## you must install python package `appenlight_client` to make it work</%text>
398
398
399 <%text>## errormator enabled</%text>
399 <%text>## appenlight enabled</%text>
400 errormator = false
400 appenlight = false
401
401
402 errormator.server_url = https://api.errormator.com
402 appenlight.server_url = https://api.appenlight.com
403 errormator.api_key = YOUR_API_KEY
403 appenlight.api_key = YOUR_API_KEY
404
404
405 <%text>## TWEAK AMOUNT OF INFO SENT HERE</%text>
405 <%text>## TWEAK AMOUNT OF INFO SENT HERE</%text>
406
406
407 <%text>## enables 404 error logging (default False)</%text>
407 <%text>## enables 404 error logging (default False)</%text>
408 errormator.report_404 = false
408 appenlight.report_404 = false
409
409
410 <%text>## time in seconds after request is considered being slow (default 1)</%text>
410 <%text>## time in seconds after request is considered being slow (default 1)</%text>
411 errormator.slow_request_time = 1
411 appenlight.slow_request_time = 1
412
412
413 <%text>## record slow requests in application</%text>
413 <%text>## record slow requests in application</%text>
414 <%text>## (needs to be enabled for slow datastore recording and time tracking)</%text>
414 <%text>## (needs to be enabled for slow datastore recording and time tracking)</%text>
415 errormator.slow_requests = true
415 appenlight.slow_requests = true
416
416
417 <%text>## enable hooking to application loggers</%text>
417 <%text>## enable hooking to application loggers</%text>
418 #errormator.logging = true
418 #appenlight.logging = true
419
419
420 <%text>## minimum log level for log capture</%text>
420 <%text>## minimum log level for log capture</%text>
421 #errormator.logging.level = WARNING
421 #appenlight.logging.level = WARNING
422
422
423 <%text>## send logs only from erroneous/slow requests</%text>
423 <%text>## send logs only from erroneous/slow requests</%text>
424 <%text>## (saves API quota for intensive logging)</%text>
424 <%text>## (saves API quota for intensive logging)</%text>
425 errormator.logging_on_error = false
425 appenlight.logging_on_error = false
426
426
427 <%text>## list of additional keywords that should be grabbed from environ object</%text>
427 <%text>## list of additional keywords that should be grabbed from environ object</%text>
428 <%text>## can be string with comma separated list of words in lowercase</%text>
428 <%text>## can be string with comma separated list of words in lowercase</%text>
429 <%text>## (by default client will always send following info:</%text>
429 <%text>## (by default client will always send following info:</%text>
430 <%text>## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that</%text>
430 <%text>## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that</%text>
431 <%text>## start with HTTP* this list be extended with additional keywords here</%text>
431 <%text>## start with HTTP* this list be extended with additional keywords here</%text>
432 errormator.environ_keys_whitelist =
432 appenlight.environ_keys_whitelist =
433
433
434 <%text>## list of keywords that should be blanked from request object</%text>
434 <%text>## list of keywords that should be blanked from request object</%text>
435 <%text>## can be string with comma separated list of words in lowercase</%text>
435 <%text>## can be string with comma separated list of words in lowercase</%text>
436 <%text>## (by default client will always blank keys that contain following words</%text>
436 <%text>## (by default client will always blank keys that contain following words</%text>
437 <%text>## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'</%text>
437 <%text>## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'</%text>
438 <%text>## this list be extended with additional keywords set here</%text>
438 <%text>## this list be extended with additional keywords set here</%text>
439 errormator.request_keys_blacklist =
439 appenlight.request_keys_blacklist =
440
440
441 <%text>## list of namespaces that should be ignores when gathering log entries</%text>
441 <%text>## list of namespaces that should be ignores when gathering log entries</%text>
442 <%text>## can be string with comma separated list of namespaces</%text>
442 <%text>## can be string with comma separated list of namespaces</%text>
443 <%text>## (by default the client ignores own entries: errormator_client.client)</%text>
443 <%text>## (by default the client ignores own entries: appenlight_client.client)</%text>
444 errormator.log_namespace_blacklist =
444 appenlight.log_namespace_blacklist =
445
445
446 %elif error_aggregation_service == 'sentry':
446 %elif error_aggregation_service == 'sentry':
447 <%text>################</%text>
447 <%text>################</%text>
@@ -384,59 +384,59 b' beaker.session.secret = ${app_instance_u'
384 ############################
384 ############################
385
385
386 ####################
386 ####################
387 ### [errormator] ###
387 ### [appenlight] ###
388 ####################
388 ####################
389
389
390 ## Errormator is tailored to work with Kallithea, see
390 ## AppEnlight is tailored to work with Kallithea, see
391 ## http://errormator.com for details how to obtain an account
391 ## http://appenlight.com for details how to obtain an account
392 ## you must install python package `errormator_client` to make it work
392 ## you must install python package `appenlight_client` to make it work
393
393
394 ## errormator enabled
394 ## appenlight enabled
395 errormator = false
395 appenlight = false
396
396
397 errormator.server_url = https://api.errormator.com
397 appenlight.server_url = https://api.appenlight.com
398 errormator.api_key = YOUR_API_KEY
398 appenlight.api_key = YOUR_API_KEY
399
399
400 ## TWEAK AMOUNT OF INFO SENT HERE
400 ## TWEAK AMOUNT OF INFO SENT HERE
401
401
402 ## enables 404 error logging (default False)
402 ## enables 404 error logging (default False)
403 errormator.report_404 = false
403 appenlight.report_404 = false
404
404
405 ## time in seconds after request is considered being slow (default 1)
405 ## time in seconds after request is considered being slow (default 1)
406 errormator.slow_request_time = 1
406 appenlight.slow_request_time = 1
407
407
408 ## record slow requests in application
408 ## record slow requests in application
409 ## (needs to be enabled for slow datastore recording and time tracking)
409 ## (needs to be enabled for slow datastore recording and time tracking)
410 errormator.slow_requests = true
410 appenlight.slow_requests = true
411
411
412 ## enable hooking to application loggers
412 ## enable hooking to application loggers
413 #errormator.logging = true
413 #appenlight.logging = true
414
414
415 ## minimum log level for log capture
415 ## minimum log level for log capture
416 #errormator.logging.level = WARNING
416 #appenlight.logging.level = WARNING
417
417
418 ## send logs only from erroneous/slow requests
418 ## send logs only from erroneous/slow requests
419 ## (saves API quota for intensive logging)
419 ## (saves API quota for intensive logging)
420 errormator.logging_on_error = false
420 appenlight.logging_on_error = false
421
421
422 ## list of additional keywords that should be grabbed from environ object
422 ## list of additional keywords that should be grabbed from environ object
423 ## can be string with comma separated list of words in lowercase
423 ## can be string with comma separated list of words in lowercase
424 ## (by default client will always send following info:
424 ## (by default client will always send following info:
425 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
425 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
426 ## start with HTTP* this list be extended with additional keywords here
426 ## start with HTTP* this list be extended with additional keywords here
427 errormator.environ_keys_whitelist =
427 appenlight.environ_keys_whitelist =
428
428
429 ## list of keywords that should be blanked from request object
429 ## list of keywords that should be blanked from request object
430 ## can be string with comma separated list of words in lowercase
430 ## can be string with comma separated list of words in lowercase
431 ## (by default client will always blank keys that contain following words
431 ## (by default client will always blank keys that contain following words
432 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
432 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
433 ## this list be extended with additional keywords set here
433 ## this list be extended with additional keywords set here
434 errormator.request_keys_blacklist =
434 appenlight.request_keys_blacklist =
435
435
436 ## list of namespaces that should be ignores when gathering log entries
436 ## list of namespaces that should be ignores when gathering log entries
437 ## can be string with comma separated list of namespaces
437 ## can be string with comma separated list of namespaces
438 ## (by default the client ignores own entries: errormator_client.client)
438 ## (by default the client ignores own entries: appenlight_client.client)
439 errormator.log_namespace_blacklist =
439 appenlight.log_namespace_blacklist =
440
440
441 ################
441 ################
442 ### [sentry] ###
442 ### [sentry] ###
@@ -69,9 +69,9 b' def make_app(global_conf, full_stack=Tru'
69 if asbool(full_stack):
69 if asbool(full_stack):
70
70
71 from kallithea.lib.middleware.sentry import Sentry
71 from kallithea.lib.middleware.sentry import Sentry
72 from kallithea.lib.middleware.errormator import Errormator
72 from kallithea.lib.middleware.appenlight import AppEnlight
73 if Errormator and asbool(config['app_conf'].get('errormator')):
73 if AppEnlight and asbool(config['app_conf'].get('appenlight')):
74 app = Errormator(app, config)
74 app = AppEnlight(app, config)
75 elif Sentry:
75 elif Sentry:
76 app = Sentry(app, config)
76 app = Sentry(app, config)
77
77
@@ -12,10 +12,10 b''
12 # You should have received a copy of the GNU General Public License
12 # You should have received a copy of the GNU General Public License
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 """
14 """
15 kallithea.lib.middleware.errormator
15 kallithea.lib.middleware.appenlight
16 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17
17
18 middleware to handle errormator publishing of errors
18 middleware to handle appenlight publishing of errors
19
19
20 This file was forked by the Kallithea project in July 2014.
20 This file was forked by the Kallithea project in July 2014.
21 Original author and date, and relevant copyright and licensing information is below:
21 Original author and date, and relevant copyright and licensing information is below:
@@ -27,8 +27,8 b' Original author and date, and relevant c'
27
27
28
28
29 try:
29 try:
30 from errormator_client import make_errormator_middleware
30 from appenlight_client import make_appenlight_middleware
31 except ImportError:
31 except ImportError:
32 Errormator = None
32 AppEnlight = None
33 else:
33 else:
34 Errormator = make_errormator_middleware
34 AppEnlight = make_appenlight_middleware
@@ -396,59 +396,59 b' beaker.session.secret = {74e0cd75-b339-4'
396 ############################
396 ############################
397
397
398 ####################
398 ####################
399 ### [errormator] ###
399 ### [appenlight] ###
400 ####################
400 ####################
401
401
402 ## Errormator is tailored to work with Kallithea, see
402 ## AppEnlight is tailored to work with Kallithea, see
403 ## http://errormator.com for details how to obtain an account
403 ## http://appenlight.com for details how to obtain an account
404 ## you must install python package `errormator_client` to make it work
404 ## you must install python package `appenlight_client` to make it work
405
405
406 ## errormator enabled
406 ## appenlight enabled
407 errormator = false
407 appenlight = false
408
408
409 errormator.server_url = https://api.errormator.com
409 appenlight.server_url = https://api.appenlight.com
410 errormator.api_key = YOUR_API_KEY
410 appenlight.api_key = YOUR_API_KEY
411
411
412 ## TWEAK AMOUNT OF INFO SENT HERE
412 ## TWEAK AMOUNT OF INFO SENT HERE
413
413
414 ## enables 404 error logging (default False)
414 ## enables 404 error logging (default False)
415 errormator.report_404 = false
415 appenlight.report_404 = false
416
416
417 ## time in seconds after request is considered being slow (default 1)
417 ## time in seconds after request is considered being slow (default 1)
418 errormator.slow_request_time = 1
418 appenlight.slow_request_time = 1
419
419
420 ## record slow requests in application
420 ## record slow requests in application
421 ## (needs to be enabled for slow datastore recording and time tracking)
421 ## (needs to be enabled for slow datastore recording and time tracking)
422 errormator.slow_requests = true
422 appenlight.slow_requests = true
423
423
424 ## enable hooking to application loggers
424 ## enable hooking to application loggers
425 #errormator.logging = true
425 #appenlight.logging = true
426
426
427 ## minimum log level for log capture
427 ## minimum log level for log capture
428 #errormator.logging.level = WARNING
428 #appenlight.logging.level = WARNING
429
429
430 ## send logs only from erroneous/slow requests
430 ## send logs only from erroneous/slow requests
431 ## (saves API quota for intensive logging)
431 ## (saves API quota for intensive logging)
432 errormator.logging_on_error = false
432 appenlight.logging_on_error = false
433
433
434 ## list of additional keywords that should be grabbed from environ object
434 ## list of additional keywords that should be grabbed from environ object
435 ## can be string with comma separated list of words in lowercase
435 ## can be string with comma separated list of words in lowercase
436 ## (by default client will always send following info:
436 ## (by default client will always send following info:
437 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
437 ## 'REMOTE_USER', 'REMOTE_ADDR', 'SERVER_NAME', 'CONTENT_TYPE' + all keys that
438 ## start with HTTP* this list be extended with additional keywords here
438 ## start with HTTP* this list be extended with additional keywords here
439 errormator.environ_keys_whitelist =
439 appenlight.environ_keys_whitelist =
440
440
441 ## list of keywords that should be blanked from request object
441 ## list of keywords that should be blanked from request object
442 ## can be string with comma separated list of words in lowercase
442 ## can be string with comma separated list of words in lowercase
443 ## (by default client will always blank keys that contain following words
443 ## (by default client will always blank keys that contain following words
444 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
444 ## 'password', 'passwd', 'pwd', 'auth_tkt', 'secret', 'csrf'
445 ## this list be extended with additional keywords set here
445 ## this list be extended with additional keywords set here
446 errormator.request_keys_blacklist =
446 appenlight.request_keys_blacklist =
447
447
448 ## list of namespaces that should be ignores when gathering log entries
448 ## list of namespaces that should be ignores when gathering log entries
449 ## can be string with comma separated list of namespaces
449 ## can be string with comma separated list of namespaces
450 ## (by default the client ignores own entries: errormator_client.client)
450 ## (by default the client ignores own entries: appenlight_client.client)
451 errormator.log_namespace_blacklist =
451 appenlight.log_namespace_blacklist =
452
452
453 ################
453 ################
454 ### [sentry] ###
454 ### [sentry] ###
@@ -14,7 +14,7 b" makofile = 'kallithea/bin/template.ini.m"
14 selected_mako_conditionals = set([
14 selected_mako_conditionals = set([
15 "database_engine == 'sqlite'",
15 "database_engine == 'sqlite'",
16 "http_server == 'waitress'",
16 "http_server == 'waitress'",
17 "error_aggregation_service == 'errormator'",
17 "error_aggregation_service == 'appenlight'",
18 "error_aggregation_service == 'sentry'",
18 "error_aggregation_service == 'sentry'",
19 ])
19 ])
20
20
@@ -337,7 +337,7 b' kallithea/lib/ipaddr.py'
337 kallithea/lib/markup_renderer.py
337 kallithea/lib/markup_renderer.py
338 kallithea/lib/middleware/
338 kallithea/lib/middleware/
339 kallithea/lib/middleware/__init__.py
339 kallithea/lib/middleware/__init__.py
340 kallithea/lib/middleware/errormator.py
340 kallithea/lib/middleware/appenlight.py
341 kallithea/lib/middleware/https_fixup.py
341 kallithea/lib/middleware/https_fixup.py
342 kallithea/lib/middleware/pygrack.py
342 kallithea/lib/middleware/pygrack.py
343 kallithea/lib/middleware/sentry.py
343 kallithea/lib/middleware/sentry.py
General Comments 0
You need to be logged in to leave comments. Login now