@tracelog/lib 2.0.0 → 2.0.1-rc.69.4
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.
Potentially problematic release.
This version of @tracelog/lib might be problematic. Click here for more details.
- package/dist/browser/tracelog.esm.js +21 -27
- package/dist/browser/tracelog.esm.js.map +1 -1
- package/dist/browser/tracelog.js +1 -1
- package/dist/browser/tracelog.js.map +1 -1
- package/dist/public-api.cjs +18 -25
- package/dist/public-api.cjs.map +1 -1
- package/dist/public-api.js +18 -25
- package/dist/public-api.js.map +1 -1
- package/package.json +1 -1
package/dist/public-api.cjs
CHANGED
|
@@ -641,7 +641,7 @@ var init_performance_constants = __esm({
|
|
|
641
641
|
var version;
|
|
642
642
|
var init_package = __esm({
|
|
643
643
|
"package.json"() {
|
|
644
|
-
version = "
|
|
644
|
+
version = "2.0.1";
|
|
645
645
|
}
|
|
646
646
|
});
|
|
647
647
|
|
|
@@ -3318,7 +3318,7 @@ var init_event_manager = __esm({
|
|
|
3318
3318
|
this.emitEventsQueue(body);
|
|
3319
3319
|
} else {
|
|
3320
3320
|
this.clearSendInterval();
|
|
3321
|
-
log("warn", "Sync flush
|
|
3321
|
+
log("warn", "Sync flush complete failure, events kept in queue for retry", {
|
|
3322
3322
|
data: { eventCount: eventIds.length }
|
|
3323
3323
|
});
|
|
3324
3324
|
}
|
|
@@ -3338,21 +3338,9 @@ var init_event_manager = __esm({
|
|
|
3338
3338
|
this.removeProcessedEvents(eventIds);
|
|
3339
3339
|
this.clearSendInterval();
|
|
3340
3340
|
this.emitEventsQueue(body);
|
|
3341
|
-
const failedCount = results.filter((result) => !this.isSuccessfulResult(result)).length;
|
|
3342
|
-
if (failedCount > 0) {
|
|
3343
|
-
log(
|
|
3344
|
-
"warn",
|
|
3345
|
-
"Async flush completed with partial success, events removed from queue and persisted per failed integration",
|
|
3346
|
-
{
|
|
3347
|
-
data: { eventCount: eventsToSend.length, succeededCount: results.length - failedCount, failedCount }
|
|
3348
|
-
}
|
|
3349
|
-
);
|
|
3350
|
-
}
|
|
3351
3341
|
} else {
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
log("error", "Async flush failed for all integrations, events persisted per-integration for recovery", {
|
|
3355
|
-
data: { eventCount: eventsToSend.length, integrations: this.dataSenders.length }
|
|
3342
|
+
log("warn", "Async flush complete failure, events kept in queue for retry", {
|
|
3343
|
+
data: { eventCount: eventsToSend.length }
|
|
3356
3344
|
});
|
|
3357
3345
|
}
|
|
3358
3346
|
return anySucceeded;
|
|
@@ -3379,20 +3367,24 @@ var init_event_manager = __esm({
|
|
|
3379
3367
|
})
|
|
3380
3368
|
);
|
|
3381
3369
|
const results = await Promise.allSettled(sendPromises);
|
|
3382
|
-
this.removeProcessedEvents(eventIds);
|
|
3383
3370
|
const anySucceeded = results.some((result) => this.isSuccessfulResult(result));
|
|
3384
3371
|
if (anySucceeded) {
|
|
3372
|
+
this.removeProcessedEvents(eventIds);
|
|
3385
3373
|
this.emitEventsQueue(body);
|
|
3374
|
+
const failedCount = results.filter((result) => !this.isSuccessfulResult(result)).length;
|
|
3375
|
+
if (failedCount > 0) {
|
|
3376
|
+
log("warn", "Periodic send completed with some failures, removed from queue and persisted per-integration", {
|
|
3377
|
+
data: { eventCount: eventsToSend.length, failedCount }
|
|
3378
|
+
});
|
|
3379
|
+
}
|
|
3380
|
+
} else {
|
|
3381
|
+
log("warn", "Periodic send complete failure, events kept in queue for retry", {
|
|
3382
|
+
data: { eventCount: eventsToSend.length }
|
|
3383
|
+
});
|
|
3386
3384
|
}
|
|
3387
3385
|
if (this.eventsQueue.length === 0) {
|
|
3388
3386
|
this.clearSendInterval();
|
|
3389
3387
|
}
|
|
3390
|
-
const failedCount = results.filter((result) => !this.isSuccessfulResult(result)).length;
|
|
3391
|
-
if (failedCount > 0) {
|
|
3392
|
-
log("warn", "Events send completed with some failures, removed from queue and persisted per-integration", {
|
|
3393
|
-
data: { eventCount: eventsToSend.length, failedCount }
|
|
3394
|
-
});
|
|
3395
|
-
}
|
|
3396
3388
|
}
|
|
3397
3389
|
buildEventsPayload() {
|
|
3398
3390
|
const eventMap = /* @__PURE__ */ new Map();
|
|
@@ -4174,6 +4166,7 @@ var init_session_manager = __esm({
|
|
|
4174
4166
|
this.cleanupCrossTabSync();
|
|
4175
4167
|
this.clearStoredSession();
|
|
4176
4168
|
this.set("sessionId", null);
|
|
4169
|
+
this.set("hasStartSession", false);
|
|
4177
4170
|
this.isTracking = false;
|
|
4178
4171
|
}
|
|
4179
4172
|
/**
|
|
@@ -4188,10 +4181,10 @@ var init_session_manager = __esm({
|
|
|
4188
4181
|
* 3. Removes lifecycle listeners (visibilitychange)
|
|
4189
4182
|
* 4. Closes BroadcastChannel
|
|
4190
4183
|
* 5. Clears session from localStorage
|
|
4191
|
-
* 6. Resets `sessionId` in global state
|
|
4184
|
+
* 6. Resets `sessionId` and `hasStartSession` in global state
|
|
4192
4185
|
* 7. Sets `isTracking` to false
|
|
4193
4186
|
*
|
|
4194
|
-
* **Called by**: `App.destroy()` during application teardown
|
|
4187
|
+
* **Called by**: `App.destroy()` during application teardown or when session times out
|
|
4195
4188
|
*
|
|
4196
4189
|
* **Important**: After calling, session tracking is terminated and cannot be resumed.
|
|
4197
4190
|
* A new session will be created on next `startTracking()` call.
|