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