We have a bunch of places where we can encounter errors, but don't want to (or can't) bubble them up to the user. Instead of hardcoding some logic in those places (e.g., logging, metric increment, panic, ...), we should allow users to set a global hook to take notice of such errors.
The motivating example is reporting sentry events - we don't want to depend on a specific sentry version, but our users can.
We have a bunch of places where we can encounter errors, but don't want to (or can't) bubble them up to the user. Instead of hardcoding some logic in those places (e.g., logging, metric increment, panic, ...), we should allow users to set a global hook to take notice of such errors.
The motivating example is reporting sentry events - we don't want to depend on a specific sentry version, but our users can.