Short answer: persist the error event first, then let a small Node.js worker send a deduplicated email summary. Email wakes someone up. It should not be the incident database.
Choice Reconstruction result Trade-off
Request-process email Fast prototype Mail latency extends a student request
Persist, then notify Reconstructable timeline Requires delivery state
Email every error Immediate visibility A grading burst becomes noise
Group by fingerprint One useful thread A new failure may wait for a threshold
For an edtech API, use the second row. Retain an opaque event ID, timestamp, request ID, service, environment, deployment version, operation, error class, normalized fingerprint, stack, and redacted context. Keep learner content, access tokens, and email addresses out of the notification. The message can link to the retained event.
The distinction matters at the deadline.
What must the email prove after a student-facing incident?
The goal is reconstruction.…