@arms/rum-core
Advanced tools
Comparing version 0.0.25-beta.7 to 0.0.25-beta.8
@@ -9,3 +9,3 @@ "use strict"; | ||
var FLUSH_TIME = 3000; | ||
var MAX_EVENT_COUNT = 50; | ||
var MAX_EVENT_COUNT = 20; | ||
var Reporter = exports["default"] = /*#__PURE__*/function () { | ||
@@ -12,0 +12,0 @@ function Reporter() { |
import { IClient, IConfiguration } from "../types/client"; | ||
import { RumEvent } from "../types/rum-event"; | ||
import { RumEvent, RumExceptionEvent } from "../types/rum-event"; | ||
import { IShell } from "../types/shell"; | ||
@@ -22,5 +22,9 @@ export default abstract class Shell implements IShell { | ||
/** | ||
* 自定义上传数据 | ||
* 自定义事件上报 | ||
*/ | ||
sendCustom(payload: RumEvent): void; | ||
/** | ||
* 自定义异常上报 | ||
*/ | ||
sendException(payload: RumExceptionEvent): void; | ||
} |
@@ -41,3 +41,3 @@ "use strict"; | ||
/** | ||
* 自定义上传数据 | ||
* 自定义事件上报 | ||
*/ | ||
@@ -53,3 +53,19 @@ _proto.sendCustom = function sendCustom(payload) { | ||
}; | ||
/** | ||
* 自定义异常上报 | ||
*/ | ||
_proto.sendException = function sendException(payload) { | ||
if (!payload.name || !payload.message) { | ||
return; | ||
} | ||
var data = (0, _extends2["default"])({ | ||
times: 1 | ||
}, payload, { | ||
event_type: _rumEvent.RumEventType.EXCEPTION, | ||
type: 'custom', | ||
source: 'custom' | ||
}); | ||
this.sendEvent(data); | ||
}; | ||
return Shell; | ||
}(); |
@@ -5,2 +5,3 @@ import { ICollector } from './collector'; | ||
import { RumEvent, RumEventBundle, IViewData } from './rum-event'; | ||
import { MatchOption } from "../utils/match"; | ||
export declare enum EventType { | ||
@@ -102,3 +103,6 @@ /** | ||
collectors?: any; | ||
filters?: { | ||
[key: string]: MatchOption | MatchOption[]; | ||
}; | ||
[key: string]: any; | ||
} |
{ | ||
"name": "@arms/rum-core", | ||
"version": "0.0.25-beta.7", | ||
"version": "0.0.25-beta.8", | ||
"description": "arms rum javascript sdk core", | ||
@@ -5,0 +5,0 @@ "author": "guangli.fj <guangli.fj@alibaba-inc.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44309
1345