Skip to main content

sanic-sentry-error-handler

Travis PyPI

Sentry error handler for Sanic web server

Requirements

  • python >= 3.5

Installation

sanic-sentry-error-handler should be installed using pip:

pip install sanic-sentry-error-handler

Usage

SENTRY_DSN - Sentry DSN for your application

To begin we’ll set up a Sanic app:

>>> from sanic import Sanic
>>> from sanic_sentry import SanicSentryErrorHandler
>>> app = Sanic(__name__)
>>> app.error_handler = SanicSentryErrorHandler('http://public:secret@example.com/1')

If your application uses the Sanic exception handling views you might consider using decorator for intercepting the exceptions.

>>> from sanic import response, Sanic
>>> from sanic_sentry import SanicSentryErrorHandler
>>>
>>> sentry_client = SanicSentryErrorHandler('http://public:secret@example.com/1')
>>> app = Sanic(__name__)
>>>
>>>
>>> @app.exception([Exception, ])
>>> @sentry_client.intercept_exception
>>> def handle_exception_500(request, exception):
>>>     return response.json({"description": "Internal Server Error"}, status=500)

Metadata

Release files for sanic-sentry-error-handler 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sanic-sentry-error-handler 0.1.7
File Size Uploaded Provenance Actions
sanic-sentry-error-handler-0.1.7.tar.gz 2.9 kB Without provenance Details for sanic-sentry-error-handler-0.1.7.tar.gz

Release files / sanic-sentry-error-handler-0.1.7.tar.gz

Download URL sanic-sentry-error-handler-0.1.7.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b4a40a83ee86ff5ee4d83e52cc9a7f24f1bc1cb934a1c438545d3df64cd08acc
BLAKE2b-256 checksum
How to use checksums
a6224125cdae4716c518247fccc67d2ac81efb6d1afea4fdf0b879c63e5cd1d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Security for sanic-sentry-error-handler 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page