Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phalt/graphene-django-sentry
Capture Sentry exceptions through django-graphene views
https://github.com/phalt/graphene-django-sentry
django graphene graphene-django sentry
Last synced: 18 days ago
JSON representation
Capture Sentry exceptions through django-graphene views
- Host: GitHub
- URL: https://github.com/phalt/graphene-django-sentry
- Owner: phalt
- License: mit
- Created: 2018-11-05T15:26:24.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T22:38:28.000Z (over 1 year ago)
- Last Synced: 2024-10-12T13:32:53.759Z (about 1 month ago)
- Topics: django, graphene, graphene-django, sentry
- Language: Python
- Size: 15.6 KB
- Stars: 22
- Watchers: 2
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
🌐⚠️ graphene-django-sentry
-------*Capture Sentry exceptions in Graphene views*
When using `Graphene Django`_, you sometimes want to raise exceptions and capture them in the API.
However, Graphene Django eats the raised exceptions and you won't see it in Sentry! 😭
This package thinly wraps the normal GraphQLView with a handler that deals with Sentry errors properly.
So the results:
1. Sentry will show the true exceptions.
2. Graphene will continue to work like normal.Works with:
* Python 3.6+
* Django 2.1+
* graphene-django 2.2+.. image:: https://img.shields.io/pypi/v/graphene-django-sentry.svg
:target: https://pypi.org/project/graphene-django-sentry/.. image:: https://img.shields.io/pypi/pyversions/graphene_django_sentry.svg
:target: https://pypi.org/project/graphene_django_sentry/.. image:: https://img.shields.io/pypi/l/graphene-django-sentry.svg
:target: https://pypi.org/project/graphene-django-sentry/.. image:: https://img.shields.io/pypi/status/graphene_django_sentry.svg
:target: https://pypi.org/project/graphene_django_sentry/.. image:: https://circleci.com/gh/phalt/graphene-django-sentry/tree/master.svg?style=svg
:target: https://circleci.com/gh/phalt/graphene-django-sentry/tree/masterInstalling the project is easy:
.. code-block:: bash
pip install graphene-django-sentry
Full blown example:
.. code-block:: python
# urls.py
from .schema import schema
from graphene_django_sentry.views import SentryGraphQLViewurlpatterns = [
url(
r'^graphql',
csrf_exempt(SentryGraphQLView.as_view(schema=schema)),
name='graphql',
),
]📖 What can I do?
--------- Capture Sentry exceptions properly when they are `raise`-d in Graphene views.
🏗 Status
----------graphene-django-sentry is currently stable and suitable for use.
🎥 Credits
-----------This package was created with Cookiecutter_.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _Graphene Django: https://github.com/graphql-python/graphene-django