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
Release history Release notifications | RSS feed
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 sentry_sdk_scrapy-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5ded50cd835e9c148261341eddb4d21bbf0f48b056e5afdeb1729672e791e35 |
|
MD5 | d8a3c7ef993b47fd6f4b615312f95fe2 |
|
BLAKE2b-256 | 1b450ca689abe183e8a68bb40ce7c8796013d1e50e4956db748e461640740201 |