raven-python icon indicating copy to clipboard operation
raven-python copied to clipboard

`release` is not accepted as keyword argument in `raven.contrib.flask.Sentry`

Open kunalbhagawati opened this issue 6 years ago • 1 comments

When trying to create an instance of flask.contrib.Sentry, like so:

import raven
from raven.contrib.flask import Sentry
sentry = Sentry(level=logging.ERROR, release=raven.fetch_git_sha(os.path.dirname(__file__)))

I get this error : TypeError: __init__() got an unexpected keyword argument 'release'

Is this expected behaviour?

For: raven==6.8.0

kunalbhagawati avatar Jun 06 '18 07:06 kunalbhagawati

I also just ran into this. For now my workaround is the following:

app.config.from_object(config_name)
if app.config['SENTRY_DSN']:
    sentry.init_app(app, dsn=app.config['SENTRY_DSN'], logging=True, level=logging.ERROR)
    sentry.client.release = __version__

This feels like a total hack, but it works for now. I would like to know the correct way to do this. I couldn't find any mention of it in the documentation.

backwardspy avatar Jun 28 '18 10:06 backwardspy