Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 716 Bytes

README.md

File metadata and controls

42 lines (29 loc) · 716 Bytes

Flask Rollbar

Integration for rollbar in Flask

Example

from flask import Flask
from flask_rollbar import Rollbar
app = Flask(__name__)
app.config.update({
    'ROLLBAR_ENABLED': True,
    'ROLLBAR_SERVER_KEY': os.environ.get('ROLLBAR_SERVER_KEY'),
})

# Supports using the factory pattern as well.
Rollbar(app)

# Or
# rb = Rollbar()
# rb.init_app(app)

@app.route('/')
def index():
  return "hello world, <a href='/error'>click here for an error</a>"
 
@app.route('/error')
def error():
  a = 1 / 0
  return "Should never happen"

app.run()

Rollbar

Readme is still a work in progress