Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit fad16c8

Browse files
committedJun 21, 2018
Attempt better Sentry message grouping
Remove the unique bits from Sentry event messages in an attempt to get Sentry to start grouping the messages and sending aggregate reports instead of one report per message.
1 parent 5391a8e commit fad16c8

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed
 

‎committelemetry/classifier.py

+21-9
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,13 @@ def determine_review_system(revision_json):
246246
bug_id = parse_bugs(summary)[0]
247247
log.debug(f'changeset {changeset}: parsed bug ID {bug_id}')
248248
except IndexError:
249-
msg = f'could not determine review system for changeset {changeset}: unable to find a bug id in the changeset summary'
250-
log.info(msg)
251-
sentry.captureMessage(msg, level=logging.INFO)
249+
log.info(
250+
f'could not determine review system for changeset {changeset}: unable to '
251+
f'find a bug id in the changeset summary'
252+
)
253+
sentry.captureMessage(
254+
"could not determine review system for changeset", level=logging.INFO
255+
)
252256
return ReviewSystem.unknown
253257

254258
try:
@@ -260,9 +264,13 @@ def determine_review_system(revision_json):
260264
# bugs in with commits that have a 'no bug - do stuff' summary line.
261265
return ReviewSystem.no_bug
262266
except requests.exceptions.HTTPError as err:
263-
msg = f'could not determine review system for changeset {changeset} with bug {bug_id}: {err}'
264-
log.info(msg)
265-
sentry.captureMessage(msg, level=logging.INFO)
267+
log.info(
268+
f'could not determine review system for changeset {changeset} with bug '
269+
f'{bug_id}: {err}'
270+
)
271+
sentry.captureMessage(
272+
"could not determine review system for changeset", level=logging.INFO
273+
)
266274
return ReviewSystem.unknown
267275

268276
# 2. Check BMO for MozReview review markers because that's next-easiest.
@@ -273,9 +281,13 @@ def determine_review_system(revision_json):
273281
if has_bmo_patch_review_markers(attachments, bug_history):
274282
return ReviewSystem.bmo
275283

276-
msg = f'could not determine review system for changeset {changeset} with bug {bug_id}: the changeset is missing all known review system markers'
277-
log.info(msg)
278-
sentry.captureMessage(msg, level=logging.INFO)
284+
log.info(
285+
f'could not determine review system for changeset {changeset} with bug '
286+
f'{bug_id}: the changeset is missing all known review system markers'
287+
)
288+
sentry.captureMessage(
289+
"could not determine review system for changeset", level=logging.INFO
290+
)
279291
return ReviewSystem.unknown
280292

281293

0 commit comments

Comments
 (0)
Failed to load comments.