@splitsoftware/splitio-commons 1.3.2-rc.4 → 1.3.2-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.txt +5 -0
- package/cjs/sync/submitters/telemetrySubmitter.js +5 -5
- package/cjs/trackers/telemetryTracker.js +2 -2
- package/cjs/utils/timeTracker/now/node.js +1 -1
- package/esm/sync/submitters/telemetrySubmitter.js +5 -5
- package/esm/trackers/telemetryTracker.js +2 -2
- package/esm/utils/timeTracker/now/node.js +1 -1
- package/package.json +1 -1
- package/src/sync/submitters/telemetrySubmitter.ts +6 -6
- package/src/trackers/telemetryTracker.ts +2 -2
- package/src/utils/timeTracker/now/node.ts +1 -1
package/CHANGES.txt
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
1.4.0 (May XX, 2022)
|
|
2
|
+
- Added `scheduler.telemetryRefreshRate` property to SDK configuration, and deprecated `scheduler.metricsRefreshRate` property.
|
|
3
|
+
- Updated SDK telemetry storage, metrics and updater to be more effective and send less often.
|
|
4
|
+
- Bugfixing - Updated default values for `scheduler.impressionsRefreshRate` config parameter: 300s for OPTIMIZED impression mode and 60s for DEBUG impression mode.
|
|
5
|
+
|
|
1
6
|
1.3.1 (April 19, 2022)
|
|
2
7
|
- Bugfixing - Added peer dependencies to avoid issues when requiring some third-party dependencies used by modules of the package (Related to issue https://github.com/splitio/javascript-client/issues/662).
|
|
3
8
|
- Bugfixing - Updated `ready` method to rejects the promise with an Error object instead of a string value (Related to issue https://github.com/splitio/javascript-client/issues/654).
|
|
@@ -85,11 +85,11 @@ function telemetryCacheConfigAdapter(telemetry, settings) {
|
|
|
85
85
|
return (0, objectAssign_1.objectAssign)(getTelemetryConfigStats(settings.mode, settings.storage.type), {
|
|
86
86
|
sE: settings.streamingEnabled,
|
|
87
87
|
rR: {
|
|
88
|
-
sp: scheduler.featuresRefreshRate,
|
|
89
|
-
se: scheduler.segmentsRefreshRate,
|
|
90
|
-
im: scheduler.impressionsRefreshRate,
|
|
91
|
-
ev: scheduler.eventsPushRate,
|
|
92
|
-
te: scheduler.telemetryRefreshRate,
|
|
88
|
+
sp: scheduler.featuresRefreshRate / 1000,
|
|
89
|
+
se: scheduler.segmentsRefreshRate / 1000,
|
|
90
|
+
im: scheduler.impressionsRefreshRate / 1000,
|
|
91
|
+
ev: scheduler.eventsPushRate / 1000,
|
|
92
|
+
te: scheduler.telemetryRefreshRate / 1000,
|
|
93
93
|
},
|
|
94
94
|
uO: {
|
|
95
95
|
s: urls.sdk !== settingsValidation_1.base.urls.sdk,
|
|
@@ -29,7 +29,7 @@ function telemetryTrackerFactory(telemetryCache, now) {
|
|
|
29
29
|
if (error && error.statusCode)
|
|
30
30
|
telemetryCache.recordHttpError(operation, error.statusCode);
|
|
31
31
|
else
|
|
32
|
-
telemetryCache.recordSuccessfulSync(operation, now());
|
|
32
|
+
telemetryCache.recordSuccessfulSync(operation, Date.now());
|
|
33
33
|
};
|
|
34
34
|
},
|
|
35
35
|
sessionLength: function () {
|
|
@@ -44,7 +44,7 @@ function telemetryTrackerFactory(telemetryCache, now) {
|
|
|
44
44
|
telemetryCache.recordStreamingEvents({
|
|
45
45
|
e: e,
|
|
46
46
|
d: d,
|
|
47
|
-
t: now()
|
|
47
|
+
t: Date.now()
|
|
48
48
|
});
|
|
49
49
|
if (e === constants_1.TOKEN_REFRESH)
|
|
50
50
|
telemetryCache.recordTokenRefreshes();
|
|
@@ -80,11 +80,11 @@ export function telemetryCacheConfigAdapter(telemetry, settings) {
|
|
|
80
80
|
return objectAssign(getTelemetryConfigStats(settings.mode, settings.storage.type), {
|
|
81
81
|
sE: settings.streamingEnabled,
|
|
82
82
|
rR: {
|
|
83
|
-
sp: scheduler.featuresRefreshRate,
|
|
84
|
-
se: scheduler.segmentsRefreshRate,
|
|
85
|
-
im: scheduler.impressionsRefreshRate,
|
|
86
|
-
ev: scheduler.eventsPushRate,
|
|
87
|
-
te: scheduler.telemetryRefreshRate,
|
|
83
|
+
sp: scheduler.featuresRefreshRate / 1000,
|
|
84
|
+
se: scheduler.segmentsRefreshRate / 1000,
|
|
85
|
+
im: scheduler.impressionsRefreshRate / 1000,
|
|
86
|
+
ev: scheduler.eventsPushRate / 1000,
|
|
87
|
+
te: scheduler.telemetryRefreshRate / 1000,
|
|
88
88
|
},
|
|
89
89
|
uO: {
|
|
90
90
|
s: urls.sdk !== base.urls.sdk,
|
|
@@ -26,7 +26,7 @@ export function telemetryTrackerFactory(telemetryCache, now) {
|
|
|
26
26
|
if (error && error.statusCode)
|
|
27
27
|
telemetryCache.recordHttpError(operation, error.statusCode);
|
|
28
28
|
else
|
|
29
|
-
telemetryCache.recordSuccessfulSync(operation, now());
|
|
29
|
+
telemetryCache.recordSuccessfulSync(operation, Date.now());
|
|
30
30
|
};
|
|
31
31
|
},
|
|
32
32
|
sessionLength: function () {
|
|
@@ -41,7 +41,7 @@ export function telemetryTrackerFactory(telemetryCache, now) {
|
|
|
41
41
|
telemetryCache.recordStreamingEvents({
|
|
42
42
|
e: e,
|
|
43
43
|
d: d,
|
|
44
|
-
t: now()
|
|
44
|
+
t: Date.now()
|
|
45
45
|
});
|
|
46
46
|
if (e === TOKEN_REFRESH)
|
|
47
47
|
telemetryCache.recordTokenRefreshes();
|
package/package.json
CHANGED
|
@@ -59,7 +59,7 @@ const USER_CONSENT_MAP = {
|
|
|
59
59
|
[CONSENT_UNKNOWN]: 1,
|
|
60
60
|
[CONSENT_GRANTED]: 2,
|
|
61
61
|
[CONSENT_DECLINED]: 3
|
|
62
|
-
} as Record<ConsentStatus,
|
|
62
|
+
} as Record<ConsentStatus, number>;
|
|
63
63
|
|
|
64
64
|
function getActiveFactories() {
|
|
65
65
|
return Object.keys(usedKeysMap).length;
|
|
@@ -94,11 +94,11 @@ export function telemetryCacheConfigAdapter(telemetry: ITelemetryCacheSync, sett
|
|
|
94
94
|
return objectAssign(getTelemetryConfigStats(settings.mode, settings.storage.type), {
|
|
95
95
|
sE: settings.streamingEnabled,
|
|
96
96
|
rR: {
|
|
97
|
-
sp: scheduler.featuresRefreshRate,
|
|
98
|
-
se: scheduler.segmentsRefreshRate,
|
|
99
|
-
im: scheduler.impressionsRefreshRate,
|
|
100
|
-
ev: scheduler.eventsPushRate,
|
|
101
|
-
te: scheduler.telemetryRefreshRate,
|
|
97
|
+
sp: scheduler.featuresRefreshRate / 1000,
|
|
98
|
+
se: scheduler.segmentsRefreshRate / 1000,
|
|
99
|
+
im: scheduler.impressionsRefreshRate / 1000,
|
|
100
|
+
ev: scheduler.eventsPushRate / 1000,
|
|
101
|
+
te: scheduler.telemetryRefreshRate / 1000,
|
|
102
102
|
}, // refreshRates
|
|
103
103
|
uO: {
|
|
104
104
|
s: urls.sdk !== base.urls.sdk,
|
|
@@ -33,7 +33,7 @@ export function telemetryTrackerFactory(
|
|
|
33
33
|
return (error) => {
|
|
34
34
|
(telemetryCache as ITelemetryCacheSync).recordHttpLatency(operation, httpTime());
|
|
35
35
|
if (error && error.statusCode) (telemetryCache as ITelemetryCacheSync).recordHttpError(operation, error.statusCode);
|
|
36
|
-
else (telemetryCache as ITelemetryCacheSync).recordSuccessfulSync(operation, now());
|
|
36
|
+
else (telemetryCache as ITelemetryCacheSync).recordSuccessfulSync(operation, Date.now());
|
|
37
37
|
};
|
|
38
38
|
},
|
|
39
39
|
sessionLength() { // @ts-ignore ITelemetryCacheAsync doesn't implement the method
|
|
@@ -44,7 +44,7 @@ export function telemetryTrackerFactory(
|
|
|
44
44
|
(telemetryCache as ITelemetryCacheSync).recordAuthRejections();
|
|
45
45
|
} else {
|
|
46
46
|
(telemetryCache as ITelemetryCacheSync).recordStreamingEvents({
|
|
47
|
-
e, d, t: now()
|
|
47
|
+
e, d, t: Date.now()
|
|
48
48
|
});
|
|
49
49
|
if (e === TOKEN_REFRESH) (telemetryCache as ITelemetryCacheSync).recordTokenRefreshes();
|
|
50
50
|
}
|