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