@eventra_dev/eventra-sdk 1.1.1 → 1.1.2

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.
Files changed (2) hide show
  1. package/README.md +53 -49
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,11 +8,11 @@ Production-grade analytics SDK for tracking **feature usage, product behavior, a
8
8
 
9
9
  Eventra helps you:
10
10
 
11
- * Track feature adoption
12
- * Detect unused features
13
- * Understand user behavior
14
- * Monitor backend usage
15
- * Analyze product growth
11
+ - Track feature adoption
12
+ - Detect unused features
13
+ - Understand user behavior
14
+ - Monitor backend usage
15
+ - Analyze product growth
16
16
 
17
17
  ---
18
18
 
@@ -20,12 +20,12 @@ Eventra helps you:
20
20
 
21
21
  Eventra SDK is:
22
22
 
23
- * Lightweight (~minimal overhead)
24
- * Runtime-aware (Browser, Node, Edge, Serverless)
25
- * Resilient (batching + retry + circuit breaker)
26
- * Durable (browser persistence)
27
- * Smart (adaptive behavior per environment)
28
- * TypeScript-first
23
+ - Lightweight (~minimal overhead)
24
+ - Runtime-aware (Browser, Node, Edge, Serverless)
25
+ - Resilient (batching + retry + circuit breaker)
26
+ - Durable (browser persistence)
27
+ - Consistent (same delivery model across all environments)
28
+ - TypeScript-first
29
29
 
30
30
  ---
31
31
 
@@ -64,11 +64,11 @@ That's it.
64
64
 
65
65
  The SDK automatically handles:
66
66
 
67
- * batching (browser)
68
- * retries
69
- * queueing
70
- * flushing
71
- * runtime adaptation
67
+ - batching
68
+ - retries
69
+ - queueing
70
+ - flushing
71
+ - runtime adaptation
72
72
 
73
73
  ---
74
74
 
@@ -76,13 +76,13 @@ The SDK automatically handles:
76
76
 
77
77
  Eventra SDK adapts automatically:
78
78
 
79
- | Environment | Behavior |
80
- | ----------- | ------------------------------ |
81
- | Browser | batching + persistence + retry |
82
- | Node.js | instant send |
83
- | Serverless | sync send (no event loss) |
84
- | Edge | lightweight send |
85
- | Workers | instant send |
79
+ | Environment | Behavior |
80
+ | ----------- | -------------------------------------- |
81
+ | Browser | batching + persistence + retry |
82
+ | Node.js | batching + retry |
83
+ | Serverless | immediate flush + retry |
84
+ | Edge | lightweight batching |
85
+ | Workers | batching |
86
86
 
87
87
  No config needed.
88
88
 
@@ -167,14 +167,14 @@ tracker.track("error.occurred", {
167
167
 
168
168
  ## Where You Can Use It
169
169
 
170
- * Browser apps
171
- * React / Next.js
172
- * Node.js backends
173
- * NestJS services
174
- * Express APIs
175
- * Edge runtimes
176
- * Serverless (AWS / Vercel)
177
- * Bun / Deno
170
+ - Browser apps
171
+ - React / Next.js
172
+ - Node.js backends
173
+ - NestJS services
174
+ - Express APIs
175
+ - Edge runtimes
176
+ - Serverless (AWS / Vercel)
177
+ - Bun / Deno
178
178
 
179
179
  ---
180
180
 
@@ -190,10 +190,10 @@ const tracker = new Eventra({
190
190
  tracker.track("page.viewed");
191
191
  ```
192
192
 
193
- batching
194
- retry
195
- persistence (localStorage)
196
- flush on tab close
193
+ - batching
194
+ - retry
195
+ - persistence (localStorage)
196
+ - flush on tab close
197
197
 
198
198
  ---
199
199
 
@@ -207,8 +207,10 @@ const tracker = new Eventra({
207
207
  tracker.track("invoice.created");
208
208
  ```
209
209
 
210
- immediate send
211
- no buffering
210
+ - batching
211
+ - retry
212
+ - auto flush (interval)
213
+ - graceful shutdown support
212
214
 
213
215
  ---
214
216
 
@@ -220,14 +222,15 @@ export default async function handler(req, res) {
220
222
  apiKey: "...",
221
223
  });
222
224
 
223
- await tracker.track("function.called");
225
+ tracker.track("function.called");
224
226
 
225
227
  res.status(200).end();
226
228
  }
227
229
  ```
228
230
 
229
- no event loss
230
- sync delivery
231
+ - immediate flush
232
+ - retry
233
+ - optimized for short-lived environments
231
234
 
232
235
  ---
233
236
 
@@ -252,7 +255,7 @@ const tracker = new Eventra({
252
255
  | ------------- | ----------------------------- |
253
256
  | apiKey | Project API key |
254
257
  | endpoint | Event ingestion endpoint |
255
- | flushInterval | Batch interval (browser only) |
258
+ | flushInterval | Flush interval (ms) |
256
259
  | maxBatchSize | Events per batch |
257
260
  | maxQueueSize | Max buffer size |
258
261
  | maxRetries | Retry attempts |
@@ -273,7 +276,7 @@ await tracker.flush();
273
276
  tracker.destroy();
274
277
  ```
275
278
 
276
- Stops timers and clears internal state.
279
+ Stops timers, removes listeners, and clears internal state.
277
280
 
278
281
  ---
279
282
 
@@ -281,12 +284,12 @@ Stops timers and clears internal state.
281
284
 
282
285
  Eventra SDK includes:
283
286
 
284
- * Idempotency (no duplicates)
285
- * Retry with exponential backoff
286
- * Circuit breaker (prevents overload)
287
- * Queue persistence (browser)
288
- * Safe fallback for all runtimes
289
- * sendBeacon optimization (browser exit)
287
+ - Idempotency (stable event IDs during retries)
288
+ - Retry with exponential backoff
289
+ - Circuit breaker (prevents overload)
290
+ - Queue-based delivery (all runtimes)
291
+ - Queue persistence (browser)
292
+ - sendBeacon optimization (browser exit)
290
293
 
291
294
  ---
292
295
 
@@ -297,11 +300,12 @@ Eventra SDK includes:
297
300
  "sentAt": "2026-03-12T10:00:00Z",
298
301
  "sdk": {
299
302
  "name": "@eventra_dev/eventra-sdk",
300
- "version": "ultra",
303
+ "version": "1.0.0",
301
304
  "runtime": "browser"
302
305
  },
303
306
  "events": [
304
307
  {
308
+ "idempotencyKey": "uuid",
305
309
  "name": "user_signup",
306
310
  "userId": "user_123",
307
311
  "timestamp": "2026-03-12T10:00:00Z",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventra_dev/eventra-sdk",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"