{"id":28477293,"url":"https://github.com/klen/muffin-sentry","last_synced_at":"2025-06-29T07:33:09.709Z","repository":{"id":30261292,"uuid":"33812689","full_name":"klen/muffin-sentry","owner":"klen","description":"Sentry integration to Muffin Framework.","archived":false,"fork":false,"pushed_at":"2025-01-21T12:17:19.000Z","size":203,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-06-07T16:14:18.940Z","etag":null,"topics":["asyncio","muffin","sentry","trio"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klen.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":".github/contributing.md","funding":null,"license":null,"code_of_conduct":".github/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/codeowners","security":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-04-12T10:35:19.000Z","updated_at":"2025-01-21T12:17:22.000Z","dependencies_parsed_at":"2024-05-28T13:32:12.985Z","dependency_job_id":"0b1f4a79-43cf-4699-80c2-d2c28d71857f","html_url":"https://github.com/klen/muffin-sentry","commit_stats":null,"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/klen/muffin-sentry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin-sentry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin-sentry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin-sentry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin-sentry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klen","download_url":"https://codeload.github.com/klen/muffin-sentry/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fmuffin-sentry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262557112,"owners_count":23328236,"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","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":["asyncio","muffin","sentry","trio"],"created_at":"2025-06-07T16:11:34.948Z","updated_at":"2025-06-29T07:33:09.704Z","avatar_url":"https://github.com/klen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Muffin-Sentry\n#############\n\n.. _description:\n\n**Muffin-Sentry** -- Sentry_ Integration for Muffin_ framework\n\n.. _badges:\n\n.. image:: https://github.com/klen/muffin-sentry/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-sentry/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-sentry\n    :target: https://pypi.org/project/muffin-sentry/\n    :alt: PYPI Version\n\n.. image:: https://img.shields.io/pypi/pyversions/muffin-sentry\n    :target: https://pypi.org/project/muffin-sentry/\n    :alt: Python Versions\n\n.. _contents:\n\n.. contents::\n\n.. _requirements:\n\nRequirements\n=============\n\n- python \u003e= 3.9\n\n.. _installation:\n\nInstallation\n=============\n\n**Muffin-Sentry** should be installed using pip: ::\n\n    pip install muffin-sentry\n\n.. _usage:\n\nUsage\n=====\n\n.. code-block:: python\n\n    from muffin import Application\n    import muffin_sentry\n\n    # Create Muffin Application\n    app = Application('example')\n\n    # Initialize the plugin\n    # As alternative: jinja2 = Jinja2(app, **options)\n    sentry = muffin_sentry.Plugin()\n    sentry.setup(app, dsn=\"DSN_URL\")\n\n    # Setup custom request processors (coroutines are not supported)\n    @sentry.processor\n    def user_scope(event, hint, request):\n        if request.user:\n            event['user'] = request.user.email\n        return event\n\n    # Use it inside your handlers\n\n    # The exception will be send to Sentry\n    @app.route('/unhandled')\n    async def catch_exception(request):\n        raise Exception('unhandled')\n\n    # Capture a message by manual\n    @app.route('/capture_message')\n    async def message(request):\n        sentry.capture_message('a message from app')\n        return 'OK'\n\n    # Capture an exception by manual\n    @app.route('/capture_exception')\n    async def exception(request):\n        sentry.capture_exception(Exception())\n        return 'OK'\n\n    # Update Sentry Scope\n    @app.route('/update_user')\n    async def user(request):\n        scope = sentry.current_scope.get()\n        scope.set_user({'id': 1, 'email': 'example@example.com'})\n        sentry.capture_exception(Exception())\n        return 'OK'\n\n\nOptions\n-------\n\n=========================== ======================================= ===========================\nName                        Default value                           Desctiption\n--------------------------- --------------------------------------- ---------------------------\n**dsn**                     ``\"\"``                                  Sentry DSN for your application\n**sdk_options**             ``{}``                                  Additional options for Sentry SDK Client. See https://docs.sentry.io/platforms/python/configuration/options/\n**ignore_errors**           ``[ResponseError, ResponseRedirect]``   Exception Types to Ignore\n=========================== ======================================= ===========================\n\nYou are able to provide the options when you are initiliazing the plugin:\n\n.. code-block:: python\n\n    sentry.setup(app, dsn='DSN_URL')\n\n\nOr setup it inside ``Muffin.Application`` config using the ``SENTRY_`` prefix:\n\n.. code-block:: python\n\n   SENTRY_DSN = 'DSN_URL'\n\n``Muffin.Application`` configuration options are case insensitive\n\n.. _bugtracker:\n\nBug tracker\n===========\n\nIf you have any suggestions, bug reports or\nannoyances please report them to the issue tracker\nat https://github.com/klen/muffin-sentry/issues\n\n.. _contributing:\n\nContributing\n============\n\nDevelopment of Muffin-Sentry happens at: https://github.com/klen/muffin-sentry\n\n\nContributors\n=============\n\n* klen_ (Kirill Klenov)\n\n.. _license:\n\nLicense\n========\n\nLicensed under a `MIT license`_.\n\n.. _links:\n\n\n.. _klen: https://github.com/klen\n.. _Muffin: https://github.com/klen/muffin\n.. _Sentry: https://sentry.io/\n\n.. _MIT license: http://opensource.org/licenses/MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklen%2Fmuffin-sentry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklen%2Fmuffin-sentry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklen%2Fmuffin-sentry/lists"}