Scrapy extension for integration of Sentry SDK to Scrapy projects
Project description
scrapy-sentry-sdk
A Scrapy extension for integration of Sentry SDK to Scrapy projects.
This package provides a Scrapy extension for convenient initialization of Sentry SDK.
Installation
pip install scrapy_sentry_sdk
Usage
To use the extension add the following to you project settings.py
:
# Send exceptions to Sentry
# replace SENTRY_DSN by you own DSN
SENTRY_DSN = "XXXXXXXXXX"
# Optionally, additional configuration options can be provided
SENTRY_CLIENT_OPTIONS = {
"release": "you-project@version" # these correspond to the sentry_sdk.init kwargs
}
# Enable or disable extensions
# See https://doc.scrapy.org/en/latest/topics/extensions.html
EXTENSIONS = {
'scrapy_sentry_sdk.extensions.SentryLogging': 1, # Load SentryLogging extension before others
}
Configuration
Currently, this extension uses two Scrapy settings keys:
SENTRY_DSN
: your project DSN (string, required)SENTRY_CLIENT_OPTIONS
: additional SDK options (dict, optional)
More details on configuring the SDK can be found in Sentry documentation.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for scrapy_sentry_sdk-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96181c13943e00df8df88e46661fa78e6c362d305195f8803c53a87400014f7a |
|
MD5 | 43ca40cb8ed1554d077f3fa159fedb3d |
|
BLAKE2b-256 | 79bfafb801471c49f29462f36d862da6826e781241c28b571184de0fee89425f |