{"id":15432893,"url":"https://github.com/simonw/datasette-sentry","last_synced_at":"2025-08-02T08:03:52.703Z","repository":{"id":56760544,"uuid":"236867027","full_name":"simonw/datasette-sentry","owner":"simonw","description":"Datasette plugin for configuring Sentry","archived":false,"fork":false,"pushed_at":"2023-11-21T19:22:42.000Z","size":29,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-05T03:27:08.297Z","etag":null,"topics":["datasette","datasette-io","datasette-plugin","sentry"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-28T23:41:27.000Z","updated_at":"2023-11-22T10:53:15.000Z","dependencies_parsed_at":"2024-10-20T20:19:13.802Z","dependency_job_id":null,"html_url":"https://github.com/simonw/datasette-sentry","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"83022b92be7aab45eead571e0c54a6fe87082891"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/simonw/datasette-sentry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-sentry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-sentry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-sentry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-sentry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonw","download_url":"https://codeload.github.com/simonw/datasette-sentry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fdatasette-sentry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268350994,"owners_count":24236328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datasette","datasette-io","datasette-plugin","sentry"],"created_at":"2024-10-01T18:29:02.193Z","updated_at":"2025-08-02T08:03:52.658Z","avatar_url":"https://github.com/simonw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# datasette-sentry\n\n[![PyPI](https://img.shields.io/pypi/v/datasette-sentry.svg)](https://pypi.org/project/datasette-sentry/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/datasette-sentry?include_prereleases\u0026label=changelog)](https://github.com/simonw/datasette-sentry/releases)\n[![Tests](https://github.com/simonw/datasette-sentry/workflows/Test/badge.svg)](https://github.com/simonw/datasette-sentry/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/datasette-sentry/blob/main/LICENSE)\n\nDatasette plugin for configuring Sentry for error reporting\n \n## Installation\n```bash\npip install datasette-sentry\n```\n## Usage\n\nThis plugin only takes effect if your `metadata.json` file contains relevant top-level plugin configuration in a `\"datasette-sentry\"` configuration key.\n\nYou will need a Sentry DSN - see their [Getting Started instructions](https://docs.sentry.io/error-reporting/quickstart/?platform=python).\n\nAdd it to `metadata.json` like this:\n\n```json\n{\n    \"plugins\": {\n        \"datasette-sentry\": {\n            \"dsn\": \"https://KEY@sentry.io/PROJECTID\"\n        }\n    }\n}\n```\nSettings 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:\n```json\n{\n    \"plugins\": {\n        \"datasette-sentry\": {\n            \"dsn\": {\n                \"$env\": \"SENTRY_DSN\"\n            }\n        }\n    }\n}\n```\nThen make a `SENTRY_DSN` environment variable available to Datasette.\n\n## Configuration\n\nIn 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.\n\nFor example, to capture 25% of errors you would do this:\n\n```json\n{\n    \"plugins\": {\n        \"datasette-sentry\": {\n            \"dsn\": {\n                \"$env\": \"SENTRY_DSN\"\n            },\n            \"sample_rate\": 0.25\n        }\n    }\n}\n```\n\n### Performance monitoring\n\nSentry [Performance Monitoring](https://docs.sentry.io/product/performance/) records full traces of page for further analysis, in addition to tracking errors.\n\nYou can enable that by adding \"enable_tracing\" to your plugin configuration:\n\n```json\n{\n    \"plugins\": {\n        \"datasette-sentry\": {\n            \"dsn\": {\n                \"$env\": \"SENTRY_DSN\"\n            },\n            \"enable_tracing\": true\n        }\n    }\n}\n```\nThe default sample rate if you do this will be `1.0`, meaning every response will be traced. This can get expensive - you can adjust the tracing rate using `traces_sample_rate`. Set that to `0.1` to sample 10% of requests, for example:\n\n```json\n{\n    \"plugins\": {\n        \"datasette-sentry\": {\n            \"dsn\": {\n                \"$env\": \"SENTRY_DSN\"\n            },\n            \"enable_tracing\": true,\n            \"traces_sample_rate\": 0.1\n        }\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fdatasette-sentry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonw%2Fdatasette-sentry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fdatasette-sentry/lists"}