Skip to main content

Nameko extension sends entrypoint exceptions to sentry

Project description

Extension for nameko that sends entrypoint exceptions to a sentry server.

Usage

Add your sentry DSN and optional client configuration to your nameko config file:

# config.yaml
SENTRY:
    DSN: ...
    CLIENT_CONFIG:
        site: "my site name"
        processors:
            - myapp.processors.SanitizePasswordsProcessor
...

Include the SentryReporter dependency in your service class:

# service.py
from nameko.web.handlers import http
from nameko_sentry import SentryReporter

class Service(object):
    name = "demo"

    sentry = SentryReporter()

    @http("GET", "/broken")
    def broken(self, request):
        raise SomeException("boom")

Run your service, providing the config file:

$ nameko run service --config config.yaml

Exceptions in entrypoints will be sent to your sentry server:

$ curl -i http://localhost:8000/broken
HTTP/1.1 500 INTERNAL SERVER ERROR
Content-Type: text/plain; charset=utf-8
Content-Length: 23
Date: Tue, 28 Jul 2015 13:34:06 GMT

Error: SomeException: boom
Screenshot of reported error

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nameko-sentry-0.0.4.tar.gz (3.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page