Sentry Logging

kingfisher_scrapy.extensions.sentry_logging.get_secrets(settings)[source]

Return the values of secret settings.

kingfisher_scrapy.extensions.sentry_logging.scrub(value, secrets)[source]

Replace secrets in all strings in an event.

kingfisher_scrapy.extensions.sentry_logging.before_send(event, hint, secrets=())[source]

Scrub secrets, and filter out ERROR-level log messages about TCP, DNS and HTTP errors.

class kingfisher_scrapy.extensions.sentry_logging.SentryLogging(sentry_dsn, secrets=())[source]

Sends exceptions and log records to Sentry. Log records with a level of ERROR or higher are captured as events.

classmethod from_crawler(crawler)[source]