Closed Bug 1552973 Opened 6 years ago Closed 6 years ago

Do not send CrashIDNotFound messages to Sentry, or combine into one issue

Categories

(Socorro :: Webapp, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwhitlock, Assigned: jwhitlock)

Details

Attachments

(1 file)

With the Sentry SDK, the logger.error call when crash data is not found is turned into a Sentry event:

https://github.com/mozilla-services/socorro/blob/b649e89fc6dc440adf78fccecc0a8f2327b97cf0/socorro/external/boto/crash_data.py#L68

In some cases, this seems to happen when a crash is viewed before processing is complete, and doesn't re-occur when the crash is processed.

Because the message is distinct, a new event is created each time it is encountered.

One way to handle the issue is to apply formatting in the logger:

self.logger.error('%(datatype)s not found: %(exception)s',
                  {'datatype': params.datatype, 'exception': cidnf})

This should use the format string to add new events to the same issue, avoiding creating many similar issues.

Another option is to change to .warning, so that it will not be auto-logged. The formatting change can be made at the same time.

A third option is to ignore messages from this logger.

Summary: Do not send CrashIDNotFound messages to Sentry → Do not send CrashIDNotFound messages to Sentry, or combine into one issue
Type: task → enhancement

Changes .error to .warning, and switches from a pre-formatted string to a format string.

Assignee: nobody → jwhitlock

There's an existing crash with no metadata in stage that was causing one of these issues. I reloaded that page, got a "crash not found" message in the browser, a line in the stage logs, and no event in Sentry. Ready for prod.

Deployed to production, these messages are no longer added as events in Sentry.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: