UNPKG

@datadog/browser-logs

Version:
20 lines 880 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.startReportError = startReportError; const browser_core_1 = require("@datadog/browser-core"); const isAuthorized_1 = require("./logger/isAuthorized"); function startReportError(lifeCycle) { return (error) => { lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, { rawLogsEvent: { message: error.message, date: error.startClocks.timeStamp, origin: browser_core_1.ErrorSource.AGENT, status: isAuthorized_1.StatusType.error, }, }); // monitor-until: forever, to keep an eye on the errors reported to customers (0, browser_core_1.addTelemetryDebug)('Error reported to customer', { 'error.message': error.message }); }; } //# sourceMappingURL=reportError.js.map