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 |
## |
|
|
394 |
## http:// |
|
|
395 |
## you must install python package ` |
|
|
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 |
## |
|
|
398 | errormator = false | |
|
397 | ## appenlight enabled | |
|
398 | appenlight = false | |
|
399 | 399 | |
|
400 |
|
|
|
401 |
|
|
|
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 |
|
|
|
406 | appenlight.report_404 = false | |
|
407 | 407 | |
|
408 | 408 | ## time in seconds after request is considered being slow (default 1) |
|
409 |
|
|
|
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 |
|
|
|
413 | appenlight.slow_requests = true | |
|
414 | 414 | |
|
415 | 415 | ## enable hooking to application loggers |
|
416 |
# |
|
|
416 | #appenlight.logging = true | |
|
417 | 417 | |
|
418 | 418 | ## minimum log level for log capture |
|
419 |
# |
|
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
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: |
|
|
442 |
|
|
|
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 == ' |
|
|
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>### [ |
|
|
389 | <%text>### [appenlight] ###</%text> | |
|
390 | 390 | <%text>####################</%text> |
|
391 | 391 | |
|
392 |
<%text>## |
|
|
393 |
<%text>## http:// |
|
|
394 |
<%text>## you must install python package ` |
|
|
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>## |
|
|
397 | errormator = false | |
|
396 | <%text>## appenlight enabled</%text> | |
|
397 | appenlight = false | |
|
398 | 398 | |
|
399 |
|
|
|
400 |
|
|
|
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 |
|
|
|
405 | appenlight.report_404 = false | |
|
406 | 406 | |
|
407 | 407 | <%text>## time in seconds after request is considered being slow (default 1)</%text> |
|
408 |
|
|
|
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 |
|
|
|
412 | appenlight.slow_requests = true | |
|
413 | 413 | |
|
414 | 414 | <%text>## enable hooking to application loggers</%text> |
|
415 |
# |
|
|
415 | #appenlight.logging = true | |
|
416 | 416 | |
|
417 | 417 | <%text>## minimum log level for log capture</%text> |
|
418 |
# |
|
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
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: |
|
|
441 |
|
|
|
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 |
### [ |
|
|
384 | ### [appenlight] ### | |
|
385 | 385 | #################### |
|
386 | 386 | |
|
387 |
## |
|
|
388 |
## http:// |
|
|
389 |
## you must install python package ` |
|
|
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 |
## |
|
|
392 | errormator = false | |
|
391 | ## appenlight enabled | |
|
392 | appenlight = false | |
|
393 | 393 | |
|
394 |
|
|
|
395 |
|
|
|
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 |
|
|
|
400 | appenlight.report_404 = false | |
|
401 | 401 | |
|
402 | 402 | ## time in seconds after request is considered being slow (default 1) |
|
403 |
|
|
|
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 |
|
|
|
407 | appenlight.slow_requests = true | |
|
408 | 408 | |
|
409 | 409 | ## enable hooking to application loggers |
|
410 |
# |
|
|
410 | #appenlight.logging = true | |
|
411 | 411 | |
|
412 | 412 | ## minimum log level for log capture |
|
413 |
# |
|
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
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: |
|
|
436 |
|
|
|
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. |
|
|
74 |
if |
|
|
75 |
app = |
|
|
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. |
|
|
15 | kallithea.lib.middleware.appenlight | |
|
16 | 16 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
17 | 17 | |
|
18 |
middleware to handle |
|
|
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 |
|
|
30 | from appenlight_client import make_appenlight_middleware | |
|
31 | 31 | except ImportError: |
|
32 |
|
|
|
32 | AppEnlight = None | |
|
33 | 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 |
## |
|
|
394 |
## http:// |
|
|
395 |
## you must install python package ` |
|
|
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 |
## |
|
|
398 | errormator = false | |
|
397 | ## appenlight enabled | |
|
398 | appenlight = false | |
|
399 | 399 | |
|
400 |
|
|
|
401 |
|
|
|
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 |
|
|
|
406 | appenlight.report_404 = false | |
|
407 | 407 | |
|
408 | 408 | ## time in seconds after request is considered being slow (default 1) |
|
409 |
|
|
|
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 |
|
|
|
413 | appenlight.slow_requests = true | |
|
414 | 414 | |
|
415 | 415 | ## enable hooking to application loggers |
|
416 |
# |
|
|
416 | #appenlight.logging = true | |
|
417 | 417 | |
|
418 | 418 | ## minimum log level for log capture |
|
419 |
# |
|
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
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: |
|
|
442 |
|
|
|
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/ |
|
|
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