Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enrich crash email with detail and hints where crash reason can be inferred #4936

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Steve-Mcl
Copy link
Contributor

@Steve-Mcl Steve-Mcl commented Dec 18, 2024

closes #4934

Description

  • passes crash detail from API to postoffice routine
  • checks/infers the 2 suggested stop reasons from the data:
    • out of memory
    • unhandled exception
  • Adds 2 email templates for these conditions with each one including specific extra info:
    • possible reasons
    • possible solutions
    • last (max) 20 log entries
  • Updates the generic Crash template to also display last (max) 20 log entries (only displayed if the context data includes logs)

Screenshots

image

image

image

Related Issue(s)

owner: #4934
parent: #4653

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • Includes a DB migration? -> add the area:migration label

@Steve-Mcl
Copy link
Contributor Author

@joepavitt added as 2nd reviewer for the visual aspect

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 92.72727% with 4 lines in your changes missing coverage. Please review.

Project coverage is 78.64%. Comparing base (775c19f) to head (c05b898).
Report is 29 commits behind head on main.

Files with missing lines Patch % Lines
forge/postoffice/index.js 89.28% 3 Missing ⚠️
forge/routes/logging/index.js 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4936   +/-   ##
=======================================
  Coverage   78.64%   78.64%           
=======================================
  Files         324      327    +3     
  Lines       15265    15347   +82     
  Branches     3507     3535   +28     
=======================================
+ Hits        12005    12070   +65     
- Misses       3260     3277   +17     
Flag Coverage Δ
backend 78.64% <92.72%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Steve-Mcl
Copy link
Contributor Author

Added tests:

  Instance Alerts emails
    Alerts
      ✔ Crashed, via api (no logs) (79ms)
      ✔ Crashed, generic, via api (including logs)
      ✔ Crashed, out-of-memory, via api (including logs) (51ms)
      ✔ Crashed, uncaught-exception, via api (including logs) (42ms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use launcher exit info to improve "Instance Crashed" email
1 participant