Registers the error-collection callback for the global monitor.
First-wins: the first call claims the sink for the lifetime of the js-core module instance;
subsequent calls are ignored and return false. This avoids a late-loading SDK silently
hijacking an earlier SDK's internal-error telemetry.
Limitation / trade-off: when several SDKs share the same js-core module instance, only the
first SDK's callback receives internal errors caught by the global monitor — including errors
raised by shared code (e.g. transport) on behalf of a later-loading SDK. Those errors are
attributed to the first SDK's telemetry. There is no per-SDK attribution today; this is the
pragmatic simplification chosen over threading monitor functions through every call site. We
can revisit a per-SDK strategy (e.g. context-based attribution) in the future.
Registers the error-collection callback for the global monitor.
First-wins: the first call claims the sink for the lifetime of the js-core module instance; subsequent calls are ignored and return
false. This avoids a late-loading SDK silently hijacking an earlier SDK's internal-error telemetry.Limitation / trade-off: when several SDKs share the same js-core module instance, only the first SDK's callback receives internal errors caught by the global monitor — including errors raised by shared code (e.g. transport) on behalf of a later-loading SDK. Those errors are attributed to the first SDK's telemetry. There is no per-SDK attribution today; this is the pragmatic simplification chosen over threading monitor functions through every call site. We can revisit a per-SDK strategy (e.g. context-based attribution) in the future.