Datasette plugin for configuring Sentry
Project description
datasette-sentry
Datasette plugin for configuring Sentry for error reporting
Installation
pip install datasette-sentry
Usage
This plugin only takes effect if your metadata.json
file contains relevant top-level plugin configuration in a "datasette-sentry"
configuration key.
You will need a Sentry DSN - see their Getting Started instructions.
Add it to metadata.json
like this:
{
"plugins": {
"datasette-sentry": {
"dsn": "https://KEY@sentry.io/PROJECTID"
}
}
}
Settings in metadata.json
are visible to anyone who visits the /-/metadata
URL so this is a good place to take advantage of Datasette's secret configuration values, in which case your configuration will look more like this:
{
"plugins": {
"datasette-sentry": {
"dsn": {
"$env": "SENTRY_DSN"
}
}
}
}
Then make a SENTRY_DSN
environment variable available to Datasette.
Configuration
In addition to the dsn
setting, you can also configure the Sentry sample rate by setting sample_rate
to a floating point number between 0 and 1.
For example, to capture 25% of errors you would do this:
{
"plugins": {
"datasette-sentry": {
"dsn": {
"$env": "SENTRY_DSN"
},
"sample_rate": 0.25
}
}
}
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
Hashes for datasette_sentry-0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9c7eb58ddb55306ce7bbf77c69f0c1f09ce155551fc3e5069af1d6484183051 |
|
MD5 | 0ef85d0c423f4dd27a87bdc609790d1a |
|
BLAKE2b-256 | 8ea47b6231f09d565684399b7cbc6be20e2329033e22b5977336120220179fe0 |