raven-python
raven-python copied to clipboard
`release` is not accepted as keyword argument in `raven.contrib.flask.Sentry`
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
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.