Creates an instance of Aggregator.
Logger instance for logging error registration and handling.
Maximum number of errors to keep in the registry. Older errors are removed as new ones are added.
Flag to determine if stack traces should be included in the error records.
Returns a combined list of all the registered errors
Last update date
The current number of registered errors
Adds an error to the registry, converting it to a structured format.
The error to register.
Register a component or a list of components to monitor for errors.
Component or list of components to be registered
Updates the registry with errors from worker threads/processes.
Array of errors from workers.
The Aggregator class is responsible for aggregating and managing error events from various components within an application. It allows for centralized error handling, supporting a structured approach to error logging and potentially error recovery strategies.
It extends EventEmitter to emit error events, enabling other parts of the application to listen and respond to these error events as needed.