launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #12182
[Merge] lp:~lifeless/python-oops-tools/timeline into lp:python-oops-tools
Robert Collins has proposed merging lp:~lifeless/python-oops-tools/timeline into lp:python-oops-tools.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~lifeless/python-oops-tools/timeline/+merge/125086
Upgrade oops-tools infrastructure a bit, get latest django in the 1.3 series - 1.3.3, and then on top of that introduce timeline-django so we can capture the SQL calls being made when oops-tools itself has an issue.
This also provides a bit of a reference-use-case for using django-timeline.
We may find we need to implement tighter query filtering - I don't know whether the django-sso-auth stuff will be caught properly, so we may end up deploying, getting a couple of traces, and then disabling in prod.
--
https://code.launchpad.net/~lifeless/python-oops-tools/timeline/+merge/125086
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~lifeless/python-oops-tools/timeline into lp:python-oops-tools.
=== modified file 'buildout-templates/bin/oopstools.wsgi.in'
--- buildout-templates/bin/oopstools.wsgi.in 2011-12-12 06:11:11 +0000
+++ buildout-templates/bin/oopstools.wsgi.in 2012-09-19 02:29:21 +0000
@@ -14,6 +14,11 @@
from oops_wsgi.django import OOPSWSGIHandler
application = OOPSWSGIHandler()
+from timeline import wsgi as timeline_wsgi
+from timeline_django.setup import setup_for_requests as timeline_django_setup
+
+timeline_django_setup()
+application = timeline_wsgi.make_app(application)
# Report OOPSes back to us.
from functools import partial
@@ -28,6 +33,13 @@
config = Config()
config.template['reporter'] = '${configuration:oops-web-amqp-reporter}'
install_hooks(config)
+
+# Attach the timeline to error reports
+import oops_timeline
+from timeline_django.filters import install_hooks
+oops_timeline.install_hooks(config)
+install_hooks(config)
+
# Can add custom filters / hooks if needed - see docs.
factory = partial(amqp.Connection, host=settings.OOPS_WEB_AMQP_HOST,
userid=settings.OOPS_WEB_AMQP_USER,
@@ -38,4 +50,5 @@
config.publishers.append(publisher)
# finally we can wrap the app with OOPS reporting
-application = make_app(application, config, oops_on_status=['500'])
+application = make_app(application, config, oops_on_status=['500'],
+ soft_start_timeout=20000)
=== modified file 'buildout-templates/src/oopstools/settings.py.in'
--- buildout-templates/src/oopstools/settings.py.in 2012-07-27 04:27:53 +0000
+++ buildout-templates/src/oopstools/settings.py.in 2012-09-19 02:29:21 +0000
@@ -62,6 +62,7 @@
)
MIDDLEWARE_CLASSES = (
+ 'timeline_django.middleware.TimelineMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
=== modified file 'buildout.cfg'
--- buildout.cfg 2011-12-12 06:11:11 +0000
+++ buildout.cfg 2012-09-19 02:29:21 +0000
@@ -60,7 +60,6 @@
[django]
recipe = djangorecipe
-version = 1.3
project = oopstools
projectegg = oopstools
settings = settings
=== modified file 'setup.py'
--- setup.py 2011-12-12 06:11:11 +0000
+++ setup.py 2012-09-19 02:29:21 +0000
@@ -50,6 +50,7 @@
'src/oopstools/NEWS.txt'),
install_requires=[
'BeautifulSoup',
+ 'django',
'fixtures',
'launchpadlib',
'lazr.config',
@@ -57,12 +58,14 @@
'oops-amqp',
'oops-datedir-repo',
'oops-wsgi',
+ 'oops-timeline',
'psycopg2',
'pytz',
'setuptools',
'South',
'sqlparse',
'testtools',
+ 'timeline',
'zope.cachedescriptors',
'zope.testbrowser',
#'Django', - installed through djangorecipe.
=== modified file 'versions.cfg'
--- versions.cfg 2012-03-23 00:49:01 +0000
+++ versions.cfg 2012-09-19 02:29:21 +0000
@@ -13,7 +13,8 @@
South = 0.7.3-r929
Sphinx = 1.0.7
sqlparse = 0.1.3
-djangorecipe = 0.19.2
+django = 1.3.3
+djangorecipe = 1.3
distribute = 0.6.12
docutils = 0.6
launchpadlib = 1.9.11
@@ -22,12 +23,15 @@
oops = 0.0.10
oops-amqp = 0.0.5
oops-datedir-repo = 0.0.15
+oops-timeline = 0.0.2
oops-wsgi = 0.0.10
# XXX: 2011-11-17 GavinPanella bug=891249: pyscopg2 2.4.2 is
# incompatible with Django 1.3, but 2.4.1 works fine.
psycopg2 = 2.4.1
setuptools = 0.6c11
testtools = 0.9.12
+timeline = 0.0.3
+timeline_django = 0.0.1
z3c.recipe.filetemplate = 2.1.0
z3c.recipe.sphinxdoc = 0.0.8
z3c.recipe.tag = 0.4.0