pypi_packages: datasette-sentry
This data as json
name | summary | classifiers | description | author | author_email | description_content_type | home_page | keywords | license | maintainer | maintainer_email | package_url | platform | project_url | project_urls | release_url | requires_dist | requires_python | version | yanked | yanked_reason |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
datasette-sentry | Datasette plugin for configuring Sentry | ["License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8"] | # datasette-sentry [](https://pypi.org/project/datasette-sentry/) [](https://github.com/simonw/datasette-sentry/releases) [](https://github.com/simonw/datasette-sentry/actions?query=workflow%3ATest) [](https://github.com/simonw/datasette-sentry/blob/main/LICENSE) 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](https://docs.sentry.io/error-reporting/quickstart/?platform=python). Add it to `metadata.json` like this: ```json { "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](https://datasette.readthedocs.io/en/stable/plugins.html#secret-configuration-values), in which case your configuration will look more like this: ```json { "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](https://docs.sentry.io/platforms/python/configuration/sampling/) by setting `sample_rate` to a floating point number between 0 and 1. For example, to capture 25% of errors you would do this: ```json { "plugins": { "datasette-sentry": { "dsn": { "$env": "SENTRY_DSN" }, "sample_rate": 0.25 } } } ``` | Simon Willison | text/markdown | https://github.com/simonw/datasette-sentry | Apache License, Version 2.0 | https://pypi.org/project/datasette-sentry/ | https://pypi.org/project/datasette-sentry/ | {"Homepage": "https://github.com/simonw/datasette-sentry"} | https://pypi.org/project/datasette-sentry/0.3/ | ["sentry-sdk", "datasette (>=0.62)", "pytest ; extra == 'test'", "pytest-asyncio ; extra == 'test'"] | 0.3 | 0 |