datadog-frontend-toolkit 1.0.75 → 1.0.76

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 +43 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -394,13 +394,15 @@ npx datadog-frontend-toolkit status -s my-app -e production
394
394
  **Dashboard (1):**
395
395
  - Frontend Observability overview with RUM metrics, Web Vitals, error tracking, API endpoint errors, and performance panels
396
396
 
397
- **Monitors (6):** — thresholds adapt to your `--load-size` profile
397
+ **Monitors (8):** — thresholds adapt to your `--load-size` profile
398
398
  - High Frontend Error Rate
399
399
  - Poor LCP Performance (avg LCP > 3s)
400
400
  - High CLS Score (avg CLS > 0.2)
401
401
  - JS Error Spike
402
402
  - Error Log Anomaly
403
403
  - Slow Page Load (avg loading time > 5s)
404
+ - Failed API Calls (4xx/5xx)
405
+ - Repeated 404 on API Endpoints
404
406
 
405
407
  ### Traffic Load Profiles (`--load-size`)
406
408
 
@@ -464,6 +466,46 @@ Add another notification target? (y/N):
464
466
 
465
467
  When using `-y` (skip prompts) without `--notify`, no notification channels are configured.
466
468
 
469
+ ### Dashboard Filters (`--filter`)
470
+
471
+ Add template variable dropdowns to the dashboard for filtering RUM data by custom context attributes. By default, four filters are included based on common RUM global context properties:
472
+
473
+ | Filter | RUM Attribute | Description |
474
+ |--------|---------------|-------------|
475
+ | `user` | `@context.user` | Filter by user ID |
476
+ | `survey` | `@context.survey` | Filter by survey ID |
477
+ | `crossProject` | `@context.crossProject` | Filter by cross-project ID |
478
+ | `companyId` | `@context.companyId` | Filter by company ID |
479
+
480
+ These defaults match the standard `datadogRum.setGlobalContextProperty()` calls:
481
+
482
+ ```typescript
483
+ datadogRum.setGlobalContextProperty('user', userId);
484
+ datadogRum.setGlobalContextProperty('survey', surveyId);
485
+ datadogRum.setGlobalContextProperty('crossProject', crossProjectId);
486
+ datadogRum.setGlobalContextProperty('companyId', companyId);
487
+ ```
488
+
489
+ The `--filter` flag is **repeatable** and uses the format `name:@context.attribute`:
490
+
491
+ ```bash
492
+ # Use default filters (user, survey, crossProject, companyId)
493
+ npx datadog-frontend-toolkit setup -s my-app -e production --force
494
+
495
+ # Custom filters (replaces defaults)
496
+ npx datadog-frontend-toolkit setup -s my-app -e production \
497
+ --filter user:@context.user \
498
+ --filter org:@context.orgId \
499
+ --filter tenant:@context.tenantId
500
+
501
+ # Disable all filters
502
+ npx datadog-frontend-toolkit setup -s my-app -e production --no-filters
503
+ ```
504
+
505
+ When `--filter` is provided, only the specified filters are used (defaults are replaced). When neither `--filter` nor `--no-filters` is provided, the four default filters are applied automatically.
506
+
507
+ > **Note:** Filters only work if your frontend sets the corresponding RUM global context properties via `datadogRum.setGlobalContextProperty()`. The dashboard dropdowns will show `*` (all) by default and populate with actual values once data flows in.
508
+
467
509
  **SLOs (2) — environment-aware targets:**
468
510
 
469
511
  | SLO | Type | Metric | Production | Non-production |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datadog-frontend-toolkit",
3
- "version": "1.0.75",
3
+ "version": "1.0.76",
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",