Closed murtuzamvista closed 7 years ago
My Logging config:-
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'root': { 'level': 'WARNING', 'handlers': ['sentry'], }, 'formatters': { 'verbose': { 'format': ('%(levelname)s %(asctime)s %(module)s %(process)d ' '%(thread)d %(message)s') }, }, 'handlers': { 'sentry': { 'level': 'ERROR', 'class': ('raven.contrib.django.raven_compat.handlers.' 'SentryHandler'), }, }, 'loggers': { 'sentry_errors': { 'level': 'ERROR', 'handlers': ['sentry'], 'propagate': False },
}
Code raising sentry alerts:- logger = logging.getLogger('sentry_errors') logger.error("Handled exception occurred", exc_info=True, extra={ "request": renderer_context['request'].data, "response": renderer_context['response'].data })
logger = logging.getLogger('sentry_errors') logger.error("Handled exception occurred", exc_info=True, extra={ "request": renderer_context['request'].data, "response": renderer_context['response'].data })
I am only receiving Culprit and Project information on slack. Is it possible to capture request and response ?
Culprit
Project
request
response
My Logging config:-
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'root': { 'level': 'WARNING', 'handlers': ['sentry'], }, 'formatters': { 'verbose': { 'format': ('%(levelname)s %(asctime)s %(module)s %(process)d ' '%(thread)d %(message)s') }, }, 'handlers': { 'sentry': { 'level': 'ERROR', 'class': ('raven.contrib.django.raven_compat.handlers.' 'SentryHandler'), }, }, 'loggers': { 'sentry_errors': { 'level': 'ERROR', 'handlers': ['sentry'], 'propagate': False },
}
Code raising sentry alerts:-
logger = logging.getLogger('sentry_errors') logger.error("Handled exception occurred", exc_info=True, extra={ "request": renderer_context['request'].data, "response": renderer_context['response'].data })
I am only receiving
Culprit
andProject
information on slack. Is it possible to capturerequest
andresponse
?