datadog-frontend-toolkit 1.0.44 → 1.0.46

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 +48 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Enterprise-grade, framework-agnostic frontend observability toolkit for Datadog.
4
4
 
5
- One `init()` call to auto-instrument **RUM**, **Logs**, **Error Tracking**, **Performance Monitoring**, and auto-provision **Dashboards**, **Monitors** & **SLOs** in Datadog.
5
+ One `init()` call to auto-instrument **RUM**, **Logs**, **Error Tracking**, **Performance Monitoring**, and auto-provision **Dashboards**, **Monitors**, **SLOs** & **Burn Rate Alerts** in Datadog.
6
6
 
7
7
  ---
8
8
 
@@ -16,7 +16,10 @@ One `init()` call to auto-instrument **RUM**, **Logs**, **Error Tracking**, **Pe
16
16
  - **Web Vitals tracking** — LCP, CLS, FID, INP, FCP, TTFB with threshold alerts
17
17
  - **Network interception** — monitors XHR/Fetch for failures and slow requests
18
18
  - **PII sanitization** — auto-redacts emails, credit cards, passwords from logs
19
- - **Resource provisioning CLI** — auto-creates Dashboards, Monitors, and SLOs
19
+ - **Resource provisioning CLI** — auto-creates Dashboards, Monitors, SLOs, and Burn Rate Alerts
20
+ - **Environment-aware SLO targets** — 99.5% for production, 95% for non-production
21
+ - **Google SRE burn rate alerts** — multi-window, multi-burn-rate alerting with auto-clamped thresholds
22
+ - **Resource teardown** — `--remove` flag deletes all managed resources for a service/environment
20
23
  - **Plugin system** — extend with custom integrations
21
24
  - **Lifecycle hooks** — `beforeInit`, `afterInit`, `beforeLog`, `beforeError`
22
25
  - **Child loggers** — scoped context for module-specific logging
@@ -315,9 +318,12 @@ init({
315
318
 
316
319
  ## CLI — Resource Provisioning
317
320
 
318
- The CLI provisions Datadog resources (dashboards, monitors, SLOs) for your service automatically with an **interactive wizard**.
321
+ The CLI provisions Datadog resources (dashboards, monitors, SLOs, and burn rate alerts) for your service automatically with an **interactive wizard**.
319
322
 
320
323
  > **Note:** This uses Datadog API/App keys and runs server-side only. Never expose these keys in the browser.
324
+ >
325
+ > - **API Key:** [Organization Settings → API Keys](https://app.datadoghq.com/organization-settings/api-keys)
326
+ > - **Application Key:** [Organization Settings → Application Keys](https://app.datadoghq.com/organization-settings/application-keys)
321
327
 
322
328
  ### Setup Resources
323
329
 
@@ -348,6 +354,20 @@ npx datadog-frontend-toolkit setup -s my-app -e production --force
348
354
  npx datadog-frontend-toolkit setup -s my-app -e production --no-slos
349
355
  ```
350
356
 
357
+ ### Remove Resources
358
+
359
+ Delete all toolkit-managed resources for a given service/environment:
360
+
361
+ ```bash
362
+ # Interactive confirmation before deleting
363
+ npx datadog-frontend-toolkit setup -s my-app -e production --remove
364
+
365
+ # Skip confirmation
366
+ npx datadog-frontend-toolkit setup -s my-app -e production --remove -y
367
+ ```
368
+
369
+ This finds and deletes all monitors, SLOs, burn rate alerts, and dashboards tagged with `managed:datadog-frontend-toolkit` for the specified service and environment.
370
+
351
371
  ### Check Status
352
372
 
353
373
  ```bash
@@ -356,8 +376,8 @@ npx datadog-frontend-toolkit status -s my-app -e production
356
376
 
357
377
  ### What Gets Provisioned
358
378
 
359
- **Dashboard:**
360
- - Frontend Observability overview with RUM metrics, Web Vitals, error tracking, and performance panels
379
+ **Dashboard (1):**
380
+ - Frontend Observability overview with RUM metrics, Web Vitals, error tracking, API endpoint errors, and performance panels
361
381
 
362
382
  **Monitors (6):**
363
383
  - High Frontend Error Rate (>50 errors/5min)
@@ -367,8 +387,23 @@ npx datadog-frontend-toolkit status -s my-app -e production
367
387
  - Error Log Anomaly (>200 error logs/15min)
368
388
  - Poor INP Performance (avg INP > 400ms)
369
389
 
370
- **SLOs (1):**
371
- - Frontend Availability (99.5% target, monitor-based)
390
+ **SLOs (2) — environment-aware targets:**
391
+
392
+ | SLO | Type | Metric | Production | Non-production |
393
+ |-----|------|--------|------------|----------------|
394
+ | Frontend Availability | metric | `view.error_free / view` | 99.5% | 95% |
395
+ | Core Web Vitals (LCP) | time-slice | `p75 LCP < 2.5s` | 75% | 75% |
396
+
397
+ **Burn Rate Alerts (4) — Google SRE multi-window, multi-burn-rate:**
398
+
399
+ For each SLO, two burn rate alert monitors are created:
400
+
401
+ | Alert | Burn Rate | Window | Action |
402
+ |-------|-----------|--------|--------|
403
+ | High Burn Rate | ~14× (budget exhausted in ~2 days) | 1h long / 5m short | 🔥 Investigate immediately |
404
+ | Slow Burn Rate | ~6× (budget exhausted in ~5 days) | 6h long / 30m short | ⚠️ Create ticket, investigate within 24h |
405
+
406
+ > Burn rate thresholds are automatically clamped based on each SLO's target to stay within Datadog's allowed range (`max = 1/(1-target)`).
372
407
 
373
408
  ### Direct Access Links
374
409
 
@@ -381,15 +416,19 @@ After provisioning, the CLI outputs **clickable direct links** to every resource
381
416
  ✅ Monitors:
382
417
  my-app (production) - High Frontend Error Rate
383
418
  https://app.datadoghq.com/monitors/123456789
419
+ my-app (production) - Frontend Availability - High Burn Rate
420
+ https://app.datadoghq.com/monitors/123456790
384
421
  ...
385
422
  ✅ SLOs:
386
423
  my-app (production) - Frontend Availability
387
424
  https://app.datadoghq.com/slo?slo_id=abcdef123456
425
+ my-app (production) - Core Web Vitals (LCP)
426
+ https://app.datadoghq.com/slo?slo_id=abcdef789012
388
427
  ```
389
428
 
390
429
  ### Markdown Summary
391
430
 
392
- A `datadog-observability-{service}.md` file is generated in the current directory with a full summary of all provisioned resources and their direct links. You can commit this to your repo or share it with your team.
431
+ A `datadog-observability-{service}.md` file is generated in the current directory with a full summary of all provisioned resources, descriptions, and direct links. You can commit this to your repo or share it with your team.
393
432
 
394
433
  ### Idempotent Execution
395
434
 
@@ -407,7 +446,7 @@ npx datadog-frontend-toolkit setup -s my-app -e production --force -y
407
446
  This is useful when:
408
447
  - Dashboard templates have been updated with new widgets or sections
409
448
  - Monitor thresholds or queries need to be refreshed
410
- - SLO tags or configurations have changed
449
+ - SLO targets or burn rate configurations have changed
411
450
 
412
451
  ---
413
452
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datadog-frontend-toolkit",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "Enterprise-grade, framework-agnostic frontend observability toolkit for Datadog. Auto-instruments RUM, Logs, Error Tracking, Performance Monitoring, and provisions Dashboards, Monitors & SLOs.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",