Merge lp:~lifeless/python-oops-tools/hostname into lp:python-oops-tools

Proposed by Robert Collins
Status: Merged
Approved by: Robert Collins
Approved revision: 21
Merged at revision: 19
Proposed branch: lp:~lifeless/python-oops-tools/hostname
Merge into: lp:python-oops-tools
Diff against target: 65 lines (+15/-0)
4 files modified
src/oopstools/NEWS.txt (+6/-0)
src/oopstools/oops/models.py (+5/-0)
src/oopstools/oops/templates/oops.html (+2/-0)
src/oopstools/oops/test/pagetest.txt (+2/-0)
To merge this branch: bzr merge lp:~lifeless/python-oops-tools/hostname
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+82466@code.launchpad.net

Commit message

Show the host and reporter for OOPSes in the detailed view of an OOPS.

Description of the change

Might be useful to know the host an oops occurred on, right?

To post a comment you must log in.
21. By Robert Collins

Expose reporter as well.

Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/oopstools/NEWS.txt'
--- src/oopstools/NEWS.txt 2011-11-16 08:08:33 +0000
+++ src/oopstools/NEWS.txt 2011-11-16 23:24:24 +0000
@@ -11,6 +11,9 @@
11* Flush stdout when logging an OOPS receipt in amqp2disk.11* Flush stdout when logging an OOPS receipt in amqp2disk.
12 (Robert Collins, #884569)12 (Robert Collins, #884569)
1313
14* Hostnames are now shown in the OOPS detail page. This makes it possible to
15 figure out if one host in particular is having trouble. (Robert Collins)
16
14* Long oops ids - which are likely hashes - no longer have the old appserver id17* Long oops ids - which are likely hashes - no longer have the old appserver id
15 heuristic applied to them: if they have a missing or empty reporter, they are18 heuristic applied to them: if they have a missing or empty reporter, they are
16 associated with the instance 'unknown'. (Robert Collins, #889982)19 associated with the instance 'unknown'. (Robert Collins, #889982)
@@ -27,6 +30,9 @@
27 Timelines without this information will show 'unknown' in the relevant30 Timelines without this information will show 'unknown' in the relevant
28 column on the OOPS page. (Robert Collins, #890976)31 column on the OOPS page. (Robert Collins, #890976)
2932
33* The OOPS reporter field - or prefix as it was known - is now shown
34 in the OOPS details page. (Robert Collins)
35
30* The req_vars variable in OOPS reports may now be a dict.36* The req_vars variable in OOPS reports may now be a dict.
31 (Robert Collins, #888866)37 (Robert Collins, #888866)
3238
3339
=== modified file 'src/oopstools/oops/models.py'
--- src/oopstools/oops/models.py 2011-11-16 08:08:33 +0000
+++ src/oopstools/oops/models.py 2011-11-16 23:24:24 +0000
@@ -523,6 +523,11 @@
523 self.parsed_oops = _get_oops(self.pathname)523 self.parsed_oops = _get_oops(self.pathname)
524 return self.parsed_oops524 return self.parsed_oops
525525
526 @readproperty
527 def hostname(self):
528 # Currently from oops reports only.
529 return self.parsed_oops.get('hostname', 'Unknown') or 'Unknown'
530
526 def _set_values(self):531 def _set_values(self):
527 ignore, self.req_vars, self.statements, self.traceback = (532 ignore, self.req_vars, self.statements, self.traceback = (
528 _get_oops_tuple(self.parsed_oops))533 _get_oops_tuple(self.parsed_oops))
529534
=== modified file 'src/oopstools/oops/templates/oops.html'
--- src/oopstools/oops/templates/oops.html 2011-11-16 08:08:33 +0000
+++ src/oopstools/oops/templates/oops.html 2011-11-16 23:24:24 +0000
@@ -37,6 +37,8 @@
37 <div id="exception">37 <div id="exception">
38 <li>Date: <span>{{ oops.date }}</span></li>38 <li>Date: <span>{{ oops.date }}</span></li>
39 <li>Page-id: <span>{{ oops.pageid }}</span></li>39 <li>Page-id: <span>{{ oops.pageid }}</span></li>
40 <li>Reporter: <span>{{ oops.prefix.value }}</span></li>
41 <li>Hostname: <span>{{ oops.hostname }}</span></li>
40 {% ifequal oops.oopsinfestation.last_seen_oops.oopsid oops.oopsid %}42 {% ifequal oops.oopsinfestation.last_seen_oops.oopsid oops.oopsid %}
41 <li>(This is the most recent instance.) </li>43 <li>(This is the most recent instance.) </li>
42 {% else %}44 {% else %}
4345
=== modified file 'src/oopstools/oops/test/pagetest.txt'
--- src/oopstools/oops/test/pagetest.txt 2011-11-16 08:08:33 +0000
+++ src/oopstools/oops/test/pagetest.txt 2011-11-16 23:24:24 +0000
@@ -35,6 +35,8 @@
35 <...35 <...
36 ...<title>OOPS-1308x1</title>...36 ...<title>OOPS-1308x1</title>...
37 ...37 ...
38 ...Reporter: <span>X</span>...
39 ...Hostname: <span>Unknown</span>...
38 ...<div id="request_variables">...40 ...<div id="request_variables">...
39 ...41 ...
40 ...<li>CHANNEL_CREATION_TIME: 1...</li>...42 ...<li>CHANNEL_CREATION_TIME: 1...</li>...

Subscribers

People subscribed via source and target branches

to all changes: