getsentry / sentry-slack

DEPRECATED Slack integration for Sentry
http://getsentry.com
BSD 3-Clause "New" or "Revised" License
139 stars 40 forks source link

Django, Sentry, Slack: How to capture request and response and post in slack? #57

Closed murtuzamvista closed 7 years ago

murtuzamvista commented 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 })

I am only receiving Culprit and Project information on slack. Is it possible to capture request and response ?