raven and newrelic

This commit is contained in:
Kenneth Reitz
2012-06-09 11:07:24 -04:00
parent 7c4d4643d9
commit 182f80b8ab
+7 -7
View File
@@ -11,7 +11,11 @@ import base64
import json
import os
import time
import newrelic.agent
from flask import Flask, Response, request, render_template, redirect, jsonify
from raven.contrib.flask import Sentry
from werkzeug.datastructures import WWWAuthenticate
from . import filters
@@ -19,13 +23,6 @@ from .helpers import get_headers, status_code, get_dict, check_basic_auth, check
from .utils import weighted_choice
from .structures import CaseInsensitiveDict
try:
import newrelic.agent
newrelic.agent.initialize()
except ImportError:
pass
ENV_COOKIES = (
'_gauges_unique',
'_gauges_unique_year',
@@ -39,6 +36,9 @@ ENV_COOKIES = (
app = Flask(__name__)
# Setup error collection
sentry = Sentry(app)
newrelic.agent.initialize()
# ------
# Routes