datadog-frontend-toolkit 1.0.69 → 1.0.71
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/dist/cjs/resources/templates/dashboard.js +84 -162
- package/dist/cjs/resources/templates/dashboard.js.map +1 -1
- package/dist/cjs/resources/templates/monitors.js +66 -0
- package/dist/cjs/resources/templates/monitors.js.map +1 -1
- package/dist/esm/resources/templates/dashboard.js +84 -162
- package/dist/esm/resources/templates/dashboard.js.map +1 -1
- package/dist/esm/resources/templates/monitors.js +66 -0
- package/dist/esm/resources/templates/monitors.js.map +1 -1
- package/dist/resources/templates/dashboard.js +84 -162
- package/dist/resources/templates/dashboard.js.map +1 -1
- package/dist/resources/templates/monitors.js +66 -0
- package/dist/resources/templates/monitors.js.map +1 -1
- package/dist/types/resources/templates/dashboard.d.ts.map +1 -1
- package/dist/types/resources/templates/monitors.d.ts +10 -0
- package/dist/types/resources/templates/monitors.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -9,6 +9,8 @@ export const THRESHOLDS_BY_LOAD = {
|
|
|
9
9
|
errorRate: { critical: 10, warning: 5, window: '15m' },
|
|
10
10
|
jsSpike: { critical: 25, warning: 10, window: '15m' },
|
|
11
11
|
logAnomaly: { critical: 50, warning: 25, window: '15m' },
|
|
12
|
+
failedApiCalls: { critical: 15, warning: 5, window: '15m' },
|
|
13
|
+
backend404: { critical: 20, warning: 10, window: '15m' },
|
|
12
14
|
lcpWindow: '4h',
|
|
13
15
|
clsWindow: '4h',
|
|
14
16
|
pageLoadWindow: '4h',
|
|
@@ -17,6 +19,8 @@ export const THRESHOLDS_BY_LOAD = {
|
|
|
17
19
|
errorRate: { critical: 50, warning: 25, window: '10m' },
|
|
18
20
|
jsSpike: { critical: 100, warning: 50, window: '10m' },
|
|
19
21
|
logAnomaly: { critical: 200, warning: 100, window: '15m' },
|
|
22
|
+
failedApiCalls: { critical: 75, warning: 30, window: '10m' },
|
|
23
|
+
backend404: { critical: 50, warning: 25, window: '10m' },
|
|
20
24
|
lcpWindow: '1h',
|
|
21
25
|
clsWindow: '1h',
|
|
22
26
|
pageLoadWindow: '1h',
|
|
@@ -25,6 +29,8 @@ export const THRESHOLDS_BY_LOAD = {
|
|
|
25
29
|
errorRate: { critical: 200, warning: 100, window: '5m' },
|
|
26
30
|
jsSpike: { critical: 500, warning: 200, window: '5m' },
|
|
27
31
|
logAnomaly: { critical: 500, warning: 250, window: '10m' },
|
|
32
|
+
failedApiCalls: { critical: 300, warning: 150, window: '5m' },
|
|
33
|
+
backend404: { critical: 150, warning: 75, window: '5m' },
|
|
28
34
|
lcpWindow: '30m',
|
|
29
35
|
clsWindow: '30m',
|
|
30
36
|
pageLoadWindow: '30m',
|
|
@@ -33,6 +39,8 @@ export const THRESHOLDS_BY_LOAD = {
|
|
|
33
39
|
errorRate: { critical: 500, warning: 250, window: '5m' },
|
|
34
40
|
jsSpike: { critical: 1000, warning: 500, window: '5m' },
|
|
35
41
|
logAnomaly: { critical: 2000, warning: 1000, window: '10m' },
|
|
42
|
+
failedApiCalls: { critical: 750, warning: 350, window: '5m' },
|
|
43
|
+
backend404: { critical: 500, warning: 250, window: '5m' },
|
|
36
44
|
lcpWindow: '15m',
|
|
37
45
|
clsWindow: '15m',
|
|
38
46
|
pageLoadWindow: '15m',
|
|
@@ -99,6 +107,9 @@ export function buildMonitorTemplates(service, env, channels = [], team, loadSiz
|
|
|
99
107
|
rumPerformance: `https://app.datadoghq.com/rum/performance-monitoring?query=${baseQuery}`,
|
|
100
108
|
logErrors: `https://app.datadoghq.com/logs?query=${baseQuery}%20status%3Aerror`,
|
|
101
109
|
logPatterns: `https://app.datadoghq.com/logs/patterns?query=${baseQuery}%20status%3Aerror`,
|
|
110
|
+
rumResources: `https://app.datadoghq.com/rum/explorer?query=${baseQuery}%20%40type%3Aresource%20%40resource.status_code%3A%3E%3D400`,
|
|
111
|
+
rumResources404: `https://app.datadoghq.com/rum/explorer?query=${baseQuery}%20%40type%3Aresource%20%40resource.status_code%3A404`,
|
|
112
|
+
log404: `https://app.datadoghq.com/logs?query=${baseQuery}%20%40http.status_code%3A404`,
|
|
102
113
|
events: `https://app.datadoghq.com/event/explorer?query=${svcEnc}`,
|
|
103
114
|
bitsAi: `https://app.datadoghq.com/bits-ai/monitors/supported`,
|
|
104
115
|
};
|
|
@@ -253,6 +264,61 @@ export function buildMonitorTemplates(service, env, channels = [], team, loadSiz
|
|
|
253
264
|
include_tags: true,
|
|
254
265
|
},
|
|
255
266
|
},
|
|
267
|
+
// Failed API Calls Monitor (RUM)
|
|
268
|
+
{
|
|
269
|
+
name: `${service} (${env}) - Failed API Calls (4xx/5xx)`,
|
|
270
|
+
type: 'rum alert',
|
|
271
|
+
query: `rum("service:${service} env:${env} @type:resource @resource.type:(xhr OR fetch) @resource.status_code:>=400").rollup("count").last("${t.failedApiCalls.window}") > ${t.failedApiCalls.critical}`,
|
|
272
|
+
message: `## Failed API Calls (4xx/5xx)\n\n**Monitor:** {{monitor_name}}\n**Service:** ${service}\n**Environment:** ${env}\n**Load Profile:** ${loadSize}\n**Triggered Value:** {{value}} failed calls (threshold: {{threshold}})\n\nThe number of failed API calls (HTTP 4xx/5xx from XHR/fetch) has exceeded ${t.failedApiCalls.critical} in ${t.failedApiCalls.window}.\n\n### Common Causes\n- **Backend deployment regression** — a new backend release returning unexpected errors\n- **Expired or invalid auth tokens** — 401/403 responses from session/token issues\n- **Removed or renamed endpoints** — 404s from API contract changes not reflected in the frontend\n- **Rate limiting** — 429 responses from hitting API or third-party rate limits\n- **Server overload** — 500/502/503 from backend capacity issues\n- **Network/infrastructure issues** — DNS, CDN, or load balancer misconfigurations\n
|
|
273
|
+
### 📋 Recommended Actions
|
|
274
|
+
1. **Check the status code breakdown** — open [RUM Resources](${links.rumResources}) and group by \`@resource.status_code\` to understand if it's mostly 4xx or 5xx.
|
|
275
|
+
2. **Identify the failing endpoints** — in [RUM Resources](${links.rumResources}), group by \`@resource.url\` to see which API endpoints are failing.
|
|
276
|
+
3. **Correlate with backend logs** — open [Log Explorer](${links.logErrors}) and look for the same endpoints returning errors.
|
|
277
|
+
4. **Check for recent deploys** — open [Event Explorer](${links.events}) for backend or frontend deployments that correlate.
|
|
278
|
+
5. **Check auth flows** — if 401/403 are dominant, investigate session expiry, token refresh, or permission changes.
|
|
279
|
+
6. **Check for rate limiting** — if 429 is present, review API quotas and implement backoff/retry strategies.
|
|
280
|
+
7. **Verify endpoint contracts** — if 404 is dominant, check if the backend removed or renamed endpoints.
|
|
281
|
+
|
|
282
|
+
### 🔍 Investigate
|
|
283
|
+
- [RUM Resources (4xx/5xx)](${links.rumResources}) — failed API calls with URL, status code, and timing
|
|
284
|
+
- [Log Explorer (errors)](${links.logErrors}) — correlated backend error logs
|
|
285
|
+
- [Event Explorer](${links.events}) — recent deploys, config changes, and incidents
|
|
286
|
+
- [Bits AI SRE](${links.bitsAi}) — AI-powered root cause analysis${notify}`,
|
|
287
|
+
tags,
|
|
288
|
+
options: {
|
|
289
|
+
thresholds: { critical: t.failedApiCalls.critical, warning: t.failedApiCalls.warning },
|
|
290
|
+
notify_no_data: false,
|
|
291
|
+
renotify_interval: 30,
|
|
292
|
+
include_tags: true,
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
// Backend 404 on Core Endpoints
|
|
296
|
+
{
|
|
297
|
+
name: `${service} (${env}) - Repeated 404 on API Endpoints`,
|
|
298
|
+
type: 'log alert',
|
|
299
|
+
query: `logs("service:${service} env:${env} @http.status_code:404").index("*").rollup("count").last("${t.backend404.window}") > ${t.backend404.critical}`,
|
|
300
|
+
message: `## Repeated 404 on API Endpoints\n\n**Monitor:** {{monitor_name}}\n**Service:** ${service}\n**Environment:** ${env}\n**Load Profile:** ${loadSize}\n**Triggered Value:** {{value}} 404 responses (threshold: {{threshold}})\n\nCore API endpoints are returning HTTP 404 (Not Found) repeatedly — ${t.backend404.critical}+ hits in ${t.backend404.window}.\n\n### Common Causes\n- **Removed or renamed API routes** — a backend deployment removed or changed a URL that the frontend still calls\n- **Misconfigured routing** — reverse proxy, load balancer, or API gateway routing rules changed\n- **Feature flag mismatch** — frontend expects an endpoint that's behind a feature flag not enabled in this environment\n- **CDN/cache purge** — assets or API responses cached at a URL that no longer exists\n- **Database-driven routes** — dynamic routes that depend on deleted or unpublished records\n\n### 📋 Recommended Actions
|
|
301
|
+
1. **Identify which endpoints are 404ing** — open [Log Explorer (404)](${links.log404}) and group by \`@http.url\` or \`@http.route\` to see the most affected endpoints.
|
|
302
|
+
2. **Check the frontend** — open [RUM Resources (404)](${links.rumResources404}) to see if users are hitting these endpoints from the UI.
|
|
303
|
+
3. **Correlate with deploys** — open [Event Explorer](${links.events}) and check if a recent backend deploy removed or renamed the endpoint.
|
|
304
|
+
4. **Check routing config** — verify API gateway, reverse proxy, or load balancer rules haven't changed.
|
|
305
|
+
5. **Verify feature flags** — ensure the endpoint isn't gated behind a flag that's disabled in this environment.
|
|
306
|
+
6. **Fix the mismatch** — either restore the endpoint, add a redirect, or update the frontend to use the new URL.
|
|
307
|
+
|
|
308
|
+
### 🔍 Investigate
|
|
309
|
+
- [Log Explorer (404)](${links.log404}) — backend 404 responses with URL and request details
|
|
310
|
+
- [RUM Resources (404)](${links.rumResources404}) — frontend-side view of 404 API calls
|
|
311
|
+
- [Log Patterns](${links.logPatterns}) — auto-clustered error patterns
|
|
312
|
+
- [Event Explorer](${links.events}) — recent deploys, config changes, and incidents
|
|
313
|
+
- [Bits AI SRE](${links.bitsAi}) — AI-powered root cause analysis (✅ supported for log monitors)${notify}`,
|
|
314
|
+
tags,
|
|
315
|
+
options: {
|
|
316
|
+
thresholds: { critical: t.backend404.critical, warning: t.backend404.warning },
|
|
317
|
+
notify_no_data: false,
|
|
318
|
+
renotify_interval: 30,
|
|
319
|
+
include_tags: true,
|
|
320
|
+
},
|
|
321
|
+
},
|
|
256
322
|
// Slow Page Load Monitor
|
|
257
323
|
{
|
|
258
324
|
name: `${service} (${env}) - Slow Page Load`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitors.js","sourceRoot":"","sources":["../../../../src/resources/templates/monitors.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,MAAM,gBAAgB,GAA6B;IACxD,GAAG,EAAE,qEAAqE;IAC1E,MAAM,EAAE,+DAA+D;IACvE,IAAI,EAAE,gEAAgE;IACtE,WAAW,EAAE,6DAA6D;CAC3E,CAAC;
|
|
1
|
+
{"version":3,"file":"monitors.js","sourceRoot":"","sources":["../../../../src/resources/templates/monitors.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,MAAM,gBAAgB,GAA6B;IACxD,GAAG,EAAE,qEAAqE;IAC1E,MAAM,EAAE,+DAA+D;IACvE,IAAI,EAAE,gEAAgE;IACtE,WAAW,EAAE,6DAA6D;CAC3E,CAAC;AAaF,MAAM,CAAC,MAAM,kBAAkB,GAAwC;IACrE,GAAG,EAAE;QACH,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE;QACtD,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;QACrD,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;QACxD,cAAc,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE;QAC3D,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;QACxD,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,IAAI;QACf,cAAc,EAAE,IAAI;KACrB;IACD,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;QAC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AAK,CAAC,SAAS;;;;sDAId,KAAK,CAAC,MAAM;;;;sBAI5C,KAAK,CAAC,cAAc;2BACf,KAAK,CAAC,QAAQ;4BACb,KAAK,CAAC,SAAS;qBACtB,KAAK,CAAC,MAAM;kBACf,KAAK,CAAC,MAAM,qCAAqC,MAAM,EAAE;YACrE,IAAI;YACJ,OAAO,EAAE;gBACP,UAAU,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE;gBACzD,cAAc,EAAE,KAAK;gBACrB,iBAAiB,EAAE,EAAE;gBACrB,YAAY,EAAE,IAAI;aACnB;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -19,16 +19,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
19
19
|
prefix: 'env',
|
|
20
20
|
default: env,
|
|
21
21
|
},
|
|
22
|
-
{
|
|
23
|
-
name: 'region',
|
|
24
|
-
prefix: 'region',
|
|
25
|
-
default: '*',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
name: 'cluster_name',
|
|
29
|
-
prefix: 'cluster_name',
|
|
30
|
-
default: '*',
|
|
31
|
-
},
|
|
32
22
|
],
|
|
33
23
|
widgets: [
|
|
34
24
|
// Header
|
|
@@ -47,18 +37,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
47
37
|
// ═══════════════════════════════════════════════════════════════
|
|
48
38
|
// SECTION 1: Production Health — concise, actionable, error-focused
|
|
49
39
|
// ═══════════════════════════════════════════════════════════════
|
|
50
|
-
{
|
|
51
|
-
definition: {
|
|
52
|
-
type: 'note',
|
|
53
|
-
content: '## 🚨 Production Health\nKey error signals and metrics at a glance',
|
|
54
|
-
background_color: 'vivid_orange',
|
|
55
|
-
font_size: '14',
|
|
56
|
-
text_align: 'center',
|
|
57
|
-
show_tick: false,
|
|
58
|
-
tick_edge: 'left',
|
|
59
|
-
tick_pos: '50%',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
40
|
{
|
|
63
41
|
definition: {
|
|
64
42
|
type: 'group',
|
|
@@ -102,6 +80,33 @@ function buildDashboardPayload(service, env, team) {
|
|
|
102
80
|
custom_unit: '%',
|
|
103
81
|
},
|
|
104
82
|
},
|
|
83
|
+
{
|
|
84
|
+
definition: {
|
|
85
|
+
type: 'query_value',
|
|
86
|
+
title: '⚠️ Error Count (absolute)',
|
|
87
|
+
requests: [
|
|
88
|
+
{
|
|
89
|
+
response_format: 'scalar',
|
|
90
|
+
queries: [
|
|
91
|
+
{
|
|
92
|
+
data_source: 'rum',
|
|
93
|
+
name: 'query1',
|
|
94
|
+
compute: { aggregation: 'count' },
|
|
95
|
+
search: { query: `service:${service} $env @type:error` },
|
|
96
|
+
indexes: ['*'],
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
conditional_formats: [
|
|
100
|
+
{ comparator: '>', value: 100, palette: 'white_on_red' },
|
|
101
|
+
{ comparator: '>', value: 20, palette: 'white_on_yellow' },
|
|
102
|
+
{ comparator: '<=', value: 20, palette: 'white_on_green' },
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
autoscale: true,
|
|
107
|
+
precision: 0,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
105
110
|
{
|
|
106
111
|
definition: {
|
|
107
112
|
type: 'query_value',
|
|
@@ -305,20 +310,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
305
310
|
],
|
|
306
311
|
},
|
|
307
312
|
},
|
|
308
|
-
// Browser Logs Widget - NEW
|
|
309
|
-
{
|
|
310
|
-
definition: {
|
|
311
|
-
type: 'log_stream',
|
|
312
|
-
title: '📋 Browser Error Logs',
|
|
313
|
-
indexes: ['*'],
|
|
314
|
-
query: `service:${service} @env:${env} status:(error OR critical) @type:log`,
|
|
315
|
-
columns: ['status_line', '@timestamp', '@error.message'],
|
|
316
|
-
show_date_column: true,
|
|
317
|
-
show_message_column: true,
|
|
318
|
-
message_display: 'expanded-md',
|
|
319
|
-
sort: { column: '@timestamp', order: 'desc' },
|
|
320
|
-
},
|
|
321
|
-
},
|
|
322
313
|
// Row 4: Error logs trend from Logs product
|
|
323
314
|
{
|
|
324
315
|
definition: {
|
|
@@ -536,7 +527,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
536
527
|
type: 'group',
|
|
537
528
|
title: 'Traffic Overview',
|
|
538
529
|
layout_type: 'ordered',
|
|
539
|
-
background_color: 'vivid_green',
|
|
540
530
|
widgets: [
|
|
541
531
|
{
|
|
542
532
|
definition: {
|
|
@@ -582,56 +572,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
582
572
|
precision: 0,
|
|
583
573
|
},
|
|
584
574
|
},
|
|
585
|
-
// User Sessions Over Time - NEW
|
|
586
|
-
{
|
|
587
|
-
definition: {
|
|
588
|
-
type: 'timeseries',
|
|
589
|
-
title: 'User Sessions Over Time',
|
|
590
|
-
show_legend: true,
|
|
591
|
-
legend_layout: 'auto',
|
|
592
|
-
legend_columns: ['avg', 'min', 'max', 'value', 'sum'],
|
|
593
|
-
requests: [
|
|
594
|
-
{
|
|
595
|
-
response_format: 'timeseries',
|
|
596
|
-
queries: [
|
|
597
|
-
{
|
|
598
|
-
data_source: 'rum',
|
|
599
|
-
name: 'query1',
|
|
600
|
-
compute: { aggregation: 'cardinality', metric: '@session.id' },
|
|
601
|
-
search: { query: `service:${service} $env` },
|
|
602
|
-
indexes: ['*'],
|
|
603
|
-
group_by: [],
|
|
604
|
-
},
|
|
605
|
-
],
|
|
606
|
-
},
|
|
607
|
-
],
|
|
608
|
-
},
|
|
609
|
-
},
|
|
610
|
-
// Views per Minute - NEW
|
|
611
|
-
{
|
|
612
|
-
definition: {
|
|
613
|
-
type: 'timeseries',
|
|
614
|
-
title: 'Views per Minute',
|
|
615
|
-
show_legend: true,
|
|
616
|
-
legend_layout: 'auto',
|
|
617
|
-
legend_columns: ['avg', 'min', 'max', 'value', 'sum'],
|
|
618
|
-
requests: [
|
|
619
|
-
{
|
|
620
|
-
response_format: 'timeseries',
|
|
621
|
-
queries: [
|
|
622
|
-
{
|
|
623
|
-
data_source: 'rum',
|
|
624
|
-
name: 'query1',
|
|
625
|
-
compute: { aggregation: 'count' },
|
|
626
|
-
search: { query: `service:${service} $env @type:view` },
|
|
627
|
-
indexes: ['*'],
|
|
628
|
-
group_by: [],
|
|
629
|
-
},
|
|
630
|
-
],
|
|
631
|
-
},
|
|
632
|
-
],
|
|
633
|
-
},
|
|
634
|
-
},
|
|
635
575
|
],
|
|
636
576
|
},
|
|
637
577
|
},
|
|
@@ -641,57 +581,23 @@ function buildDashboardPayload(service, env, team) {
|
|
|
641
581
|
type: 'group',
|
|
642
582
|
title: 'Web Vitals',
|
|
643
583
|
layout_type: 'ordered',
|
|
644
|
-
background_color: 'vivid_blue',
|
|
645
584
|
widgets: [
|
|
646
585
|
{
|
|
647
586
|
definition: {
|
|
648
587
|
type: 'timeseries',
|
|
649
588
|
title: 'Largest Contentful Paint (LCP)',
|
|
650
|
-
show_legend: true,
|
|
651
|
-
legend_layout: 'auto',
|
|
652
|
-
legend_columns: ['avg', 'min', 'max', 'value', 'sum'],
|
|
653
589
|
requests: [
|
|
654
590
|
{
|
|
655
591
|
response_format: 'timeseries',
|
|
656
592
|
queries: [
|
|
657
593
|
{
|
|
658
594
|
data_source: 'rum',
|
|
659
|
-
name: '
|
|
660
|
-
compute: { aggregation: 'p50', metric: '@view.largest_contentful_paint' },
|
|
661
|
-
search: { query: `service:${service} $env @type:view` },
|
|
662
|
-
indexes: ['*'],
|
|
663
|
-
group_by: [],
|
|
664
|
-
},
|
|
665
|
-
{
|
|
666
|
-
data_source: 'rum',
|
|
667
|
-
name: 'p75',
|
|
595
|
+
name: 'query1',
|
|
668
596
|
compute: { aggregation: 'pc75', metric: '@view.largest_contentful_paint' },
|
|
669
597
|
search: { query: `service:${service} $env @type:view` },
|
|
670
598
|
indexes: ['*'],
|
|
671
599
|
group_by: [],
|
|
672
600
|
},
|
|
673
|
-
{
|
|
674
|
-
data_source: 'rum',
|
|
675
|
-
name: 'p90',
|
|
676
|
-
compute: { aggregation: 'p90', metric: '@view.largest_contentful_paint' },
|
|
677
|
-
search: { query: `service:${service} $env @type:view` },
|
|
678
|
-
indexes: ['*'],
|
|
679
|
-
group_by: [],
|
|
680
|
-
},
|
|
681
|
-
{
|
|
682
|
-
data_source: 'rum',
|
|
683
|
-
name: 'p95',
|
|
684
|
-
compute: { aggregation: 'p95', metric: '@view.largest_contentful_paint' },
|
|
685
|
-
search: { query: `service:${service} $env @type:view` },
|
|
686
|
-
indexes: ['*'],
|
|
687
|
-
group_by: [],
|
|
688
|
-
},
|
|
689
|
-
],
|
|
690
|
-
formulas: [
|
|
691
|
-
{ formula: 'p50', alias: 'P50' },
|
|
692
|
-
{ formula: 'p75', alias: 'P75' },
|
|
693
|
-
{ formula: 'p90', alias: 'P90' },
|
|
694
|
-
{ formula: 'p95', alias: 'P95' },
|
|
695
601
|
],
|
|
696
602
|
},
|
|
697
603
|
],
|
|
@@ -705,51 +611,18 @@ function buildDashboardPayload(service, env, team) {
|
|
|
705
611
|
definition: {
|
|
706
612
|
type: 'timeseries',
|
|
707
613
|
title: 'Cumulative Layout Shift (CLS)',
|
|
708
|
-
show_legend: true,
|
|
709
|
-
legend_layout: 'auto',
|
|
710
|
-
legend_columns: ['avg', 'min', 'max', 'value', 'sum'],
|
|
711
614
|
requests: [
|
|
712
615
|
{
|
|
713
616
|
response_format: 'timeseries',
|
|
714
617
|
queries: [
|
|
715
618
|
{
|
|
716
619
|
data_source: 'rum',
|
|
717
|
-
name: '
|
|
718
|
-
compute: { aggregation: 'p50', metric: '@view.cumulative_layout_shift' },
|
|
719
|
-
search: { query: `service:${service} $env @type:view` },
|
|
720
|
-
indexes: ['*'],
|
|
721
|
-
group_by: [],
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
data_source: 'rum',
|
|
725
|
-
name: 'p75',
|
|
620
|
+
name: 'query1',
|
|
726
621
|
compute: { aggregation: 'pc75', metric: '@view.cumulative_layout_shift' },
|
|
727
622
|
search: { query: `service:${service} $env @type:view` },
|
|
728
623
|
indexes: ['*'],
|
|
729
624
|
group_by: [],
|
|
730
625
|
},
|
|
731
|
-
{
|
|
732
|
-
data_source: 'rum',
|
|
733
|
-
name: 'p90',
|
|
734
|
-
compute: { aggregation: 'p90', metric: '@view.cumulative_layout_shift' },
|
|
735
|
-
search: { query: `service:${service} $env @type:view` },
|
|
736
|
-
indexes: ['*'],
|
|
737
|
-
group_by: [],
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
data_source: 'rum',
|
|
741
|
-
name: 'p95',
|
|
742
|
-
compute: { aggregation: 'p95', metric: '@view.cumulative_layout_shift' },
|
|
743
|
-
search: { query: `service:${service} $env @type:view` },
|
|
744
|
-
indexes: ['*'],
|
|
745
|
-
group_by: [],
|
|
746
|
-
},
|
|
747
|
-
],
|
|
748
|
-
formulas: [
|
|
749
|
-
{ formula: 'p50', alias: 'P50' },
|
|
750
|
-
{ formula: 'p75', alias: 'P75' },
|
|
751
|
-
{ formula: 'p90', alias: 'P90' },
|
|
752
|
-
{ formula: 'p95', alias: 'P95' },
|
|
753
626
|
],
|
|
754
627
|
},
|
|
755
628
|
],
|
|
@@ -818,7 +691,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
818
691
|
type: 'group',
|
|
819
692
|
title: 'API Endpoint Errors',
|
|
820
693
|
layout_type: 'ordered',
|
|
821
|
-
background_color: 'vivid_purple',
|
|
822
694
|
widgets: [
|
|
823
695
|
{
|
|
824
696
|
definition: {
|
|
@@ -863,6 +735,61 @@ function buildDashboardPayload(service, env, team) {
|
|
|
863
735
|
],
|
|
864
736
|
},
|
|
865
737
|
},
|
|
738
|
+
{
|
|
739
|
+
definition: {
|
|
740
|
+
type: 'timeseries',
|
|
741
|
+
title: '4xx vs 5xx Trend',
|
|
742
|
+
requests: [
|
|
743
|
+
{
|
|
744
|
+
response_format: 'timeseries',
|
|
745
|
+
queries: [
|
|
746
|
+
{
|
|
747
|
+
data_source: 'rum',
|
|
748
|
+
name: 'client_errors',
|
|
749
|
+
compute: { aggregation: 'count' },
|
|
750
|
+
search: { query: `service:${service} $env @type:resource @resource.type:(xhr OR fetch) @resource.status_code:[400 TO 499]` },
|
|
751
|
+
indexes: ['*'],
|
|
752
|
+
group_by: [],
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
data_source: 'rum',
|
|
756
|
+
name: 'server_errors',
|
|
757
|
+
compute: { aggregation: 'count' },
|
|
758
|
+
search: { query: `service:${service} $env @type:resource @resource.type:(xhr OR fetch) @resource.status_code:[500 TO 599]` },
|
|
759
|
+
indexes: ['*'],
|
|
760
|
+
group_by: [],
|
|
761
|
+
},
|
|
762
|
+
],
|
|
763
|
+
formulas: [
|
|
764
|
+
{ formula: 'client_errors', alias: '4xx Client Errors' },
|
|
765
|
+
{ formula: 'server_errors', alias: '5xx Server Errors' },
|
|
766
|
+
],
|
|
767
|
+
},
|
|
768
|
+
],
|
|
769
|
+
},
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
definition: {
|
|
773
|
+
type: 'toplist',
|
|
774
|
+
title: '🔍 404 Not Found — Endpoints',
|
|
775
|
+
requests: [
|
|
776
|
+
{
|
|
777
|
+
response_format: 'scalar',
|
|
778
|
+
queries: [
|
|
779
|
+
{
|
|
780
|
+
data_source: 'rum',
|
|
781
|
+
name: 'query1',
|
|
782
|
+
compute: { aggregation: 'count' },
|
|
783
|
+
search: { query: `service:${service} $env @type:resource @resource.type:(xhr OR fetch) @resource.status_code:404` },
|
|
784
|
+
indexes: ['*'],
|
|
785
|
+
group_by: [{ facet: '@resource.url', limit: 15, sort: { aggregation: 'count', order: 'desc' } }],
|
|
786
|
+
},
|
|
787
|
+
],
|
|
788
|
+
formulas: [{ formula: 'query1' }],
|
|
789
|
+
},
|
|
790
|
+
],
|
|
791
|
+
},
|
|
792
|
+
},
|
|
866
793
|
],
|
|
867
794
|
},
|
|
868
795
|
},
|
|
@@ -872,7 +799,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
872
799
|
type: 'group',
|
|
873
800
|
title: 'Performance',
|
|
874
801
|
layout_type: 'ordered',
|
|
875
|
-
background_color: 'cool',
|
|
876
802
|
widgets: [
|
|
877
803
|
{
|
|
878
804
|
definition: {
|
|
@@ -926,7 +852,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
926
852
|
type: 'group',
|
|
927
853
|
title: 'Performance by Country',
|
|
928
854
|
layout_type: 'ordered',
|
|
929
|
-
background_color: 'warm',
|
|
930
855
|
widgets: [
|
|
931
856
|
{
|
|
932
857
|
definition: {
|
|
@@ -1004,7 +929,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
1004
929
|
type: 'group',
|
|
1005
930
|
title: 'Browser & Device Breakdown',
|
|
1006
931
|
layout_type: 'ordered',
|
|
1007
|
-
background_color: 'orange',
|
|
1008
932
|
widgets: [
|
|
1009
933
|
{
|
|
1010
934
|
definition: {
|
|
@@ -1102,7 +1026,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
1102
1026
|
type: 'group',
|
|
1103
1027
|
title: 'User Frustration',
|
|
1104
1028
|
layout_type: 'ordered',
|
|
1105
|
-
background_color: 'vivid_orange',
|
|
1106
1029
|
widgets: [
|
|
1107
1030
|
{
|
|
1108
1031
|
definition: {
|
|
@@ -1156,7 +1079,6 @@ function buildDashboardPayload(service, env, team) {
|
|
|
1156
1079
|
type: 'group',
|
|
1157
1080
|
title: 'Resource Loading',
|
|
1158
1081
|
layout_type: 'ordered',
|
|
1159
|
-
background_color: 'purple',
|
|
1160
1082
|
widgets: [
|
|
1161
1083
|
{
|
|
1162
1084
|
definition: {
|