@tracelog/lib 0.11.3 → 0.11.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/README.md +16 -6
- package/dist/browser/tracelog.esm.js +3040 -0
- package/dist/browser/tracelog.esm.js.map +1 -0
- package/dist/browser/tracelog.js +8 -0
- package/dist/browser/tracelog.js.map +1 -0
- package/dist/public-api.cjs +51 -11
- package/dist/public-api.cjs.map +1 -1
- package/dist/public-api.d.mts +1 -1
- package/dist/public-api.d.ts +1 -1
- package/dist/public-api.js +51 -11
- package/dist/public-api.js.map +1 -1
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -184,12 +184,22 @@ window.__traceLogDisabled = true;
|
|
|
184
184
|
|
|
185
185
|
[Full Security Guide →](./SECURITY.md)
|
|
186
186
|
|
|
187
|
-
## Error Handling
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
- **
|
|
192
|
-
- **
|
|
187
|
+
## Error Handling & Reliability
|
|
188
|
+
|
|
189
|
+
TraceLog uses a **persistence-based recovery model** with no in-session retries:
|
|
190
|
+
|
|
191
|
+
- **Success (2xx)** - Events sent immediately, queue cleared
|
|
192
|
+
- **Permanent errors (4xx)** - Events discarded immediately (invalid data won't succeed on retry)
|
|
193
|
+
- **Temporary errors (5xx/network)** - Events removed from queue and persisted to localStorage
|
|
194
|
+
- **Recovery** - Persisted events automatically recovered and retried on next page load
|
|
195
|
+
- **Expiration** - Persisted events expire after 2 hours
|
|
196
|
+
- **Page unload** - Uses `sendBeacon()` for synchronous delivery of session end events
|
|
197
|
+
|
|
198
|
+
**Why no in-session retries?**
|
|
199
|
+
- Prevents infinite retry loops during API outages
|
|
200
|
+
- Reduces server load and network traffic during failures
|
|
201
|
+
- Better battery life on mobile devices
|
|
202
|
+
- Natural recovery on page navigation (common in SPAs)
|
|
193
203
|
|
|
194
204
|
## Debug
|
|
195
205
|
|