flexion / ef-cms

An Electronic Filing / Case Management System.
23 stars 10 forks source link

Errors trigger alarm notifications #10073

Open mmarcotte opened 1 year ago

mmarcotte commented 1 year ago

As a DAWSON System Administrator, so that I can quickly triage issues in production, I need to be alerted when Lambdas produce errors.

Pre-Conditions

Acceptance Criteria

Additionally, uncaught client side errors should also be reported to a service to help us triage them. This service provides configurable alert rules allowing DAWSON System Administrators the ability to be manage how they are alerted when errors occur. NOTE: It may make sense to have the client side error handling be its own vertical slice.

Notes

Ways to make a Lambda fail

Ways to make Client side errors

Tasks

Test Cases

  1. Lambda throws an Error or logs an error, we would expect the service to receive and store as metadata about the error:

    • a stack trace of the error, if one is available
    • any included context that is passed along via applicationContext.logger.error('message', { contextKey: contextValue })
    • the lambda that triggered the error
    • the requestId of the lambda that triggered the error
    • any requests that involve a password or tokens do not have that information included
  2. Errors and exceptions are still logged to the Cloudwatch logs for debugging and troubleshooting

  3. The following errors are not sent to the service:

    • NotFoundError
    • UnkonwnUserErrror
    • UnauthorizedError
    • UnprocessableEntityError
    • ServiceUnavailableError
  4. The service sends email alerts when new errors occur. The information in the emails depends on the service used, but they link to the service that has additional context.

Story Definition of Ready (updated on 12/23/22)

The following criteria must be met in order for the user story to be picked up by the Flexion development team. The user story must:

Definition of Done (Updated 5-19-22)

Product Owner

UX

Engineering

mmarcotte commented 6 months ago

Blocked by Court Procurement on the service.

codyseibert commented 3 months ago

I'm just going to place this on blocked until next week when we can have a discussion around this.