Skip to content

Fire-and-forget notifier calls in ErrorReporter.notify #474

@alexeyr-ci

Description

@alexeyr-ci

In #471, the error reporting notifiers are called synchronously in notify:

notifiers.forEach((notifier) => {
try {
notifier(msg, tracingContext);
} catch (e) {
log.error(
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
`An error tracking notifier failed: ${(e as Error).message ?? e}\nStack:\n${(e as Error).stack}`,
);
}
});

We could possibly improve performance a bit by scheduling the calls to happen later with async or setImmediate/setTimeout. Though it's only called on error, which should be rare, and the notifiers should be fast.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions