I'm working on a project with scrapy for a while now, and i wanted to integrate sentry,
I've used scrapy-sentry but it it didn't work at all
i tried also to implement it using Extensions but it works only if an error occurred in the spider's callback (not pipelines.py, items.py)...
from scrapy import signals
from raven import Client
class FailLogger(object):
client = Client(settings.get('SENTRY_DSN'))
@classmethod
def from_crawler(cls, crawler):
ext = cls()
crawler.signals.connect(ext.spider_error, signal=signals.spider_error)
return ext
def spider_error(self, failure, response, spider):
try:
failure.raiseException()
except:
self.client.get_ident(self.client.captureException())
is there any that i can log errors (in spiders, items, pipelines ...) to sentry, like in Django?
Thank you.