@sentry/browser
Version:
Official Sentry SDK for browsers
24 lines (23 loc) • 885 B
JavaScript
const require_eventbuilder = require("../eventbuilder.js");
let _sentry_core = require("@sentry/core");
// src/integrations/linkederrors.ts
const DEFAULT_KEY = "cause";
const DEFAULT_LIMIT = 5;
const INTEGRATION_NAME = "LinkedErrors";
const _linkedErrorsIntegration = ((options = {}) => {
const limit = options.limit || DEFAULT_LIMIT;
const key = options.key || DEFAULT_KEY;
return {
name: INTEGRATION_NAME,
preprocessEvent(event, hint, client) {
const options = client.getOptions();
(0, _sentry_core.applyAggregateErrorsToEvent)(require_eventbuilder.exceptionFromError, options.stackParser, key, limit, event, hint);
}
};
});
/**
* Aggregrate linked errors in an event.
*/
const linkedErrorsIntegration = (0, _sentry_core.defineIntegration)(_linkedErrorsIntegration);
exports.linkedErrorsIntegration = linkedErrorsIntegration;
//# sourceMappingURL=linkederrors.js.map