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