sentry_top_errors 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 036da0a8225db87b61c37b236428dc72bc20a426fdc3cb83920a74ad96788bbd
4
- data.tar.gz: b98afd0bb566f7958344171264e2363d66886f86dec1a8f24bf3c10d4c00d2a3
3
+ metadata.gz: 4b815358cb7c0ff813d5f8413c20baf96fcf92c882e1c8f67cb20edf7b6c631c
4
+ data.tar.gz: 6eaf8ebaf3dd48334db7250d86d823c7adccc52e664d2dad3a65bc0aedac67d8
5
5
  SHA512:
6
- metadata.gz: 351fe1c8cba7d350cd864cc5cd036b39fb91851c425dfdf407268c3031e267edb20a3e5d73adb9d94c88da9b9417d5351b7dbb6933cde09c50617dab7cb63030
7
- data.tar.gz: ba898a868a3a3882708a13a44a1e2c35e59adfe4e4d8b791f8684f77b578df1888c260123a49f7df6243556867576bbf36f97b503a336fe4f952a6e2749a0dce
6
+ metadata.gz: 833a13244399e4308619fcb852bd50b98c03d459381ee0ea2eaec71a91e6519db5f5bdc9bf7553a6e0967ae1334b8b7a8c3de1babafc5d24d0e3a729a6be7947
7
+ data.tar.gz: 3ed0dd57a38729c9286297b08a741af9d90990e49d4b18506d38818fbd909ace63e0b4671078fd7c69a1edef4e89a45d196b606f9d14baa6560c9ecc54bd81e7
@@ -65,7 +65,9 @@ class SentryTopErrors::Reporter
65
65
  culprit: issue['culprit'],
66
66
  issue_link: issue['permalink'],
67
67
  issue_count: count_in_24h,
68
- is_production: is_production
68
+ is_production: is_production,
69
+ assigned_to: issue.dig('assignedTo', 'name'),
70
+ assigned_to_email: issue.dig('assignedTo', 'email'),
69
71
  }
70
72
 
71
73
  if count_in_24h > @threshold_24h
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sentry_top_errors"
3
- s.version = "0.1.2"
3
+ s.version = "0.1.3"
4
4
  s.summary = "Generate top errors report for sentry"
5
5
  s.description = ""
6
6
  s.author = "Pavel Evstigneev"
data/templates/index.html CHANGED
@@ -15,9 +15,9 @@
15
15
  .page-content {
16
16
  height: 100%;
17
17
  min-height: 400px;
18
- width: 92%;
19
- max-width: 1200px;
20
- margin: 30px auto;
18
+ width: 90%;
19
+ max-width: 1400px;
20
+ margin: 35px auto;
21
21
  background: #fff;
22
22
  padding: 25px;
23
23
  border-radius: 12px;
@@ -26,7 +26,7 @@
26
26
 
27
27
  h1 {
28
28
  font-size: 1.5em;
29
- background: #9d4f4f;
29
+ background: #87358e;
30
30
  margin: -25px -25px 35px -25px;
31
31
  padding: 12px 25px;
32
32
  border-radius: 12px 12px 0 0;
@@ -53,10 +53,15 @@
53
53
  }
54
54
 
55
55
  table.rows-table td, table.rows-table th {
56
- padding: 3px 7px;
56
+ padding: 4px 7px;
57
57
  border: 1px solid #cfcfcf;
58
58
  }
59
59
 
60
+ .full-width {
61
+ width: 100%;
62
+ max-width: 100%;
63
+ }
64
+
60
65
  tr.is-non-prod-issue, tr.is-non-prod-issue td a {
61
66
  color: #36487d;
62
67
  background: #f5f5f5;
@@ -81,10 +86,11 @@
81
86
  max-width: 260px;
82
87
  }
83
88
 
84
- .full-width {
85
- width: 100%;
86
- max-width: 100%;
87
- }
89
+ td.issue-assignee {
90
+ font-size: 80%;
91
+ overflow: ellipsis;
92
+ max-width: 100px;
93
+ }
88
94
  </style>
89
95
  </head>
90
96
  <body>
@@ -95,7 +101,7 @@
95
101
 
96
102
  <p>Generated at: <b>REPORT_GENERATE_DATE</b>, for sentry organization <b>REPORT_SENTRY_ORG</b></p>
97
103
 
98
- <h2>Repeating Issues</h2>
104
+ <h2>Repeating Issues (in last 24h)</h2>
99
105
 
100
106
  <table class='rows-table full-width' id="issues-table">
101
107
  <thead>
@@ -104,6 +110,7 @@
104
110
  <th>Project</th>
105
111
  <th>Issue</th>
106
112
  <th>Cause</th>
113
+ <th>User</th>
107
114
  </tr>
108
115
  </thead>
109
116
  <tbody></tbody>
@@ -118,6 +125,7 @@
118
125
  <th>Project</th>
119
126
  <th>Issue</th>
120
127
  <th>Cause</th>
128
+ <th>User</th>
121
129
  </tr>
122
130
  </thead>
123
131
  <tbody></tbody>
@@ -324,9 +332,7 @@
324
332
  </script>
325
333
 
326
334
  <script>
327
- var issuesTable = $('#issues-table tbody');
328
-
329
- ALL_ISSUE_COUNTS.forEach(issue => {
335
+ var generateRow = (issue, table) => {
330
336
  var tr = $.element('tr', {
331
337
  appendTo: issuesTable,
332
338
  class: issue.is_production ? 'is-prod-issue' : 'is-non-prod-issue',
@@ -338,22 +344,21 @@
338
344
  var issueCell = $.element('td', {appendTo: tr, class: 'issue-name'});
339
345
  $.element('a', {href: issue.issue_link, text: issue.issue, target: '_blank', appendTo: issueCell})
340
346
  $.element('td', {text: issue.culprit, appendTo: tr, class: 'issue-cause'});
341
- });
347
+ if (issue.assigned_to) {
348
+ $.element('td', {text: issue.assigned_to, appendTo: tr, class: 'issue-assignee', title: issue.assigned_to_email});
349
+ } else {
350
+ $.element('td', {appendTo: tr});
351
+ }
352
+ }
342
353
 
343
- var issuesTable = $('#new-issues-table tbody');
354
+ var issuesTable = $('#issues-table tbody');
355
+ ALL_ISSUE_COUNTS.forEach(issue => {
356
+ generateRow(issue, issuesTable);
357
+ });
344
358
 
359
+ var newIssuesTable = $('#new-issues-table tbody');
345
360
  NEW_ISSUE_COUNTS.forEach(issue => {
346
- var tr = $.element('tr', {
347
- appendTo: issuesTable,
348
- class: issue.is_production ? 'is-prod-issue' : 'is-non-prod-issue',
349
- });
350
-
351
- $.element('td', {text: issue.issue_count, appendTo: tr, class: 'issue-count'});
352
- var projectCell = $.element('td', {appendTo: tr, class: 'project-name'});
353
- $.element('a', {href: issue.project_url, text: issue.project_name, target: '_blank', appendTo: projectCell})
354
- var issueCell = $.element('td', {appendTo: tr, class: 'issue-name'});
355
- $.element('a', {href: issue.issue_link, text: issue.issue, target: '_blank', appendTo: issueCell})
356
- $.element('td', {text: issue.culprit, appendTo: tr, class: 'issue-cause'});
361
+ generateRow(issue, newIssuesTable);
357
362
  });
358
363
  </script>
359
364
  </body>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry_top_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Evstigneev