mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 23:00:18 +00:00
raven and newrelic
This commit is contained in:
+7
-7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user