@decocms/start 0.19.0
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/.cursor/skills/deco-api-call-dedup/SKILL.md +443 -0
- package/.cursor/skills/deco-apps-architecture/SKILL.md +255 -0
- package/.cursor/skills/deco-apps-architecture/app-pattern.md +288 -0
- package/.cursor/skills/deco-apps-architecture/commerce-types.md +239 -0
- package/.cursor/skills/deco-apps-architecture/new-app-guide.md +268 -0
- package/.cursor/skills/deco-apps-architecture/scripts-codegen.md +148 -0
- package/.cursor/skills/deco-apps-architecture/shared-utils.md +181 -0
- package/.cursor/skills/deco-apps-architecture/vtex-deep-structure.md +253 -0
- package/.cursor/skills/deco-apps-architecture/website-app.md +169 -0
- package/.cursor/skills/deco-apps-vtex-porting/SKILL.md +189 -0
- package/.cursor/skills/deco-apps-vtex-porting/adaptation-patterns.md +335 -0
- package/.cursor/skills/deco-apps-vtex-porting/commerce-porting.md +155 -0
- package/.cursor/skills/deco-apps-vtex-porting/cookie-auth-patterns.md +148 -0
- package/.cursor/skills/deco-apps-vtex-porting/structure-map.md +234 -0
- package/.cursor/skills/deco-apps-vtex-porting/transform-mapping.md +99 -0
- package/.cursor/skills/deco-apps-vtex-porting/website-porting.md +194 -0
- package/.cursor/skills/deco-apps-vtex-review/SKILL.md +234 -0
- package/.cursor/skills/deco-async-rendering-architecture/SKILL.md +270 -0
- package/.cursor/skills/deco-async-rendering-site-guide/SKILL.md +417 -0
- package/.cursor/skills/deco-cms-layout-caching/SKILL.md +293 -0
- package/.cursor/skills/deco-cms-route-config/SKILL.md +388 -0
- package/.cursor/skills/deco-core-architecture/SKILL.md +185 -0
- package/.cursor/skills/deco-core-architecture/blocks.md +196 -0
- package/.cursor/skills/deco-core-architecture/deco-vs-deco-start.md +191 -0
- package/.cursor/skills/deco-core-architecture/engine.md +220 -0
- package/.cursor/skills/deco-core-architecture/hooks-components.md +157 -0
- package/.cursor/skills/deco-core-architecture/plugins-clients.md +136 -0
- package/.cursor/skills/deco-core-architecture/runtime.md +116 -0
- package/.cursor/skills/deco-core-architecture/site-usage.md +165 -0
- package/.cursor/skills/deco-e2e-testing/SKILL.md +372 -0
- package/.cursor/skills/deco-e2e-testing/discovery.md +337 -0
- package/.cursor/skills/deco-e2e-testing/scripts/scaffold.sh +81 -0
- package/.cursor/skills/deco-e2e-testing/selectors.md +175 -0
- package/.cursor/skills/deco-e2e-testing/templates/package.json +18 -0
- package/.cursor/skills/deco-e2e-testing/templates/playwright.config.ts +65 -0
- package/.cursor/skills/deco-e2e-testing/templates/scripts/baseline.ts +279 -0
- package/.cursor/skills/deco-e2e-testing/templates/scripts/run-e2e.ts +194 -0
- package/.cursor/skills/deco-e2e-testing/templates/specs/ecommerce-flow.spec.ts +612 -0
- package/.cursor/skills/deco-e2e-testing/templates/tsconfig.json +12 -0
- package/.cursor/skills/deco-e2e-testing/templates/utils/metrics-collector.ts +918 -0
- package/.cursor/skills/deco-e2e-testing/troubleshooting.md +602 -0
- package/.cursor/skills/deco-edge-caching/SKILL.md +316 -0
- package/.cursor/skills/deco-full-analysis/SKILL.md +898 -0
- package/.cursor/skills/deco-full-analysis/checklists/asset-optimization.md +251 -0
- package/.cursor/skills/deco-full-analysis/checklists/bug-fix.md +189 -0
- package/.cursor/skills/deco-full-analysis/checklists/cache-strategy.md +144 -0
- package/.cursor/skills/deco-full-analysis/checklists/dependency-update.md +150 -0
- package/.cursor/skills/deco-full-analysis/checklists/hydration-fix.md +191 -0
- package/.cursor/skills/deco-full-analysis/checklists/image-optimization.md +180 -0
- package/.cursor/skills/deco-full-analysis/checklists/loader-optimization.md +165 -0
- package/.cursor/skills/deco-full-analysis/checklists/seo-fix.md +183 -0
- package/.cursor/skills/deco-full-analysis/checklists/site-cleanup.md +281 -0
- package/.cursor/skills/deco-full-analysis/discovery.md +548 -0
- package/.cursor/skills/deco-incident-debugging/SKILL.md +378 -0
- package/.cursor/skills/deco-incident-debugging/headless-mode.md +510 -0
- package/.cursor/skills/deco-incident-debugging/learnings-index.md +227 -0
- package/.cursor/skills/deco-incident-debugging/triage-workflow.md +312 -0
- package/.cursor/skills/deco-islands-migration/SKILL.md +251 -0
- package/.cursor/skills/deco-loader-n-plus-1-detector/SKILL.md +275 -0
- package/.cursor/skills/deco-performance-audit/SKILL.md +530 -0
- package/.cursor/skills/deco-performance-audit/tools-reference.md +428 -0
- package/.cursor/skills/deco-performance-audit/workflow.md +457 -0
- package/.cursor/skills/deco-server-functions-invoke/SKILL.md +92 -0
- package/.cursor/skills/deco-server-functions-invoke/architecture.md +166 -0
- package/.cursor/skills/deco-server-functions-invoke/generator.md +122 -0
- package/.cursor/skills/deco-server-functions-invoke/problem.md +98 -0
- package/.cursor/skills/deco-server-functions-invoke/troubleshooting.md +110 -0
- package/.cursor/skills/deco-site-deployment/SKILL.md +396 -0
- package/.cursor/skills/deco-site-memory-debugging/SKILL.md +121 -0
- package/.cursor/skills/deco-site-memory-debugging/cdp-connection.md +222 -0
- package/.cursor/skills/deco-site-memory-debugging/memory-analysis.md +362 -0
- package/.cursor/skills/deco-site-patterns/SKILL.md +124 -0
- package/.cursor/skills/deco-site-patterns/app-composition.md +337 -0
- package/.cursor/skills/deco-site-patterns/client-patterns.md +341 -0
- package/.cursor/skills/deco-site-patterns/cms-wiring.md +230 -0
- package/.cursor/skills/deco-site-patterns/section-patterns.md +340 -0
- package/.cursor/skills/deco-site-scaling-tuning/SKILL.md +240 -0
- package/.cursor/skills/deco-site-scaling-tuning/analysis-scripts.md +267 -0
- package/.cursor/skills/deco-start-architecture/SKILL.md +218 -0
- package/.cursor/skills/deco-start-architecture/admin-protocol.md +156 -0
- package/.cursor/skills/deco-start-architecture/cms-resolution.md +201 -0
- package/.cursor/skills/deco-start-architecture/code-quality.md +158 -0
- package/.cursor/skills/deco-start-architecture/gap-analysis.md +129 -0
- package/.cursor/skills/deco-start-architecture/sdk-utilities.md +197 -0
- package/.cursor/skills/deco-start-architecture/worker-entry-caching.md +154 -0
- package/.cursor/skills/deco-startup-analysis/SKILL.md +248 -0
- package/.cursor/skills/deco-storefront-test-checklist/SKILL.md +369 -0
- package/.cursor/skills/deco-tanstack-hydration-fixes/SKILL.md +468 -0
- package/.cursor/skills/deco-tanstack-navigation/SKILL.md +681 -0
- package/.cursor/skills/deco-tanstack-search/SKILL.md +411 -0
- package/.cursor/skills/deco-tanstack-storefront-patterns/SKILL.md +1013 -0
- package/.cursor/skills/deco-to-tanstack-migration/SKILL.md +518 -0
- package/.cursor/skills/deco-to-tanstack-migration/references/codemod-commands.md +174 -0
- package/.cursor/skills/deco-to-tanstack-migration/references/commerce/README.md +78 -0
- package/.cursor/skills/deco-to-tanstack-migration/references/deco-framework/README.md +128 -0
- package/.cursor/skills/deco-to-tanstack-migration/references/gotchas.md +719 -0
- package/.cursor/skills/deco-to-tanstack-migration/references/imports/README.md +70 -0
- package/.cursor/skills/deco-to-tanstack-migration/references/platform-hooks/README.md +154 -0
- package/.cursor/skills/deco-to-tanstack-migration/references/signals/README.md +220 -0
- package/.cursor/skills/deco-to-tanstack-migration/references/vite-config/README.md +78 -0
- package/.cursor/skills/deco-to-tanstack-migration/templates/package-json.md +55 -0
- package/.cursor/skills/deco-to-tanstack-migration/templates/root-route.md +110 -0
- package/.cursor/skills/deco-to-tanstack-migration/templates/router.md +96 -0
- package/.cursor/skills/deco-to-tanstack-migration/templates/setup-ts.md +167 -0
- package/.cursor/skills/deco-to-tanstack-migration/templates/vite-config.md +122 -0
- package/.cursor/skills/deco-to-tanstack-migration/templates/worker-entry.md +67 -0
- package/.cursor/skills/deco-typescript-fixes/SKILL.md +178 -0
- package/.cursor/skills/deco-typescript-fixes/common-fixes.md +330 -0
- package/.cursor/skills/deco-typescript-fixes/strategy.md +148 -0
- package/.cursor/skills/deco-variant-selection-perf/SKILL.md +272 -0
- package/.cursor/skills/deco-vtex-fetch-cache/SKILL.md +225 -0
- package/.cursor/skills/find-skills/SKILL.md +133 -0
- package/.cursor/skills/incident-report/SKILL.md +179 -0
- package/.cursor/skills/incident-report/references/5-whys.md +75 -0
- package/.cursor/skills/incident-report/templates/client-report.md +187 -0
- package/.cursor/skills/incident-report/templates/internal-report.md +206 -0
- package/.cursor/skills/template-skill/SKILL.md +38 -0
- package/.github/workflows/release.yml +32 -0
- package/.releaserc.json +25 -0
- package/CLAUDE.md +135 -0
- package/GAP_ANALYSIS.md +224 -0
- package/GAP_ANALYSIS_V2.md +1013 -0
- package/biome.json +39 -0
- package/knip.json +5 -0
- package/package.json +87 -0
- package/scripts/generate-blocks.ts +69 -0
- package/scripts/generate-invoke.ts +378 -0
- package/scripts/generate-schema.ts +657 -0
- package/src/admin/cors.ts +29 -0
- package/src/admin/decofile.ts +72 -0
- package/src/admin/index.ts +24 -0
- package/src/admin/invoke.ts +163 -0
- package/src/admin/liveControls.ts +29 -0
- package/src/admin/meta.ts +70 -0
- package/src/admin/render.ts +205 -0
- package/src/admin/schema.ts +686 -0
- package/src/admin/setup.ts +44 -0
- package/src/cms/index.ts +59 -0
- package/src/cms/loader.ts +180 -0
- package/src/cms/registry.ts +162 -0
- package/src/cms/resolve.ts +1005 -0
- package/src/cms/sectionLoaders.ts +294 -0
- package/src/hooks/DecoPageRenderer.tsx +444 -0
- package/src/hooks/LazySection.tsx +109 -0
- package/src/hooks/LiveControls.tsx +108 -0
- package/src/hooks/SectionErrorFallback.tsx +85 -0
- package/src/hooks/index.ts +8 -0
- package/src/index.ts +5 -0
- package/src/matchers/builtins.ts +184 -0
- package/src/matchers/posthog.ts +154 -0
- package/src/middleware/decoState.ts +55 -0
- package/src/middleware/healthMetrics.ts +131 -0
- package/src/middleware/index.ts +80 -0
- package/src/middleware/liveness.ts +21 -0
- package/src/middleware/observability.ts +205 -0
- package/src/routes/adminRoutes.ts +83 -0
- package/src/routes/cmsRoute.ts +302 -0
- package/src/routes/components.tsx +34 -0
- package/src/routes/index.ts +15 -0
- package/src/sdk/analytics.ts +72 -0
- package/src/sdk/cacheHeaders.ts +268 -0
- package/src/sdk/cachedLoader.ts +206 -0
- package/src/sdk/clx.ts +3 -0
- package/src/sdk/cookie.ts +39 -0
- package/src/sdk/createInvoke.ts +57 -0
- package/src/sdk/csp.ts +59 -0
- package/src/sdk/env.ts +27 -0
- package/src/sdk/index.ts +63 -0
- package/src/sdk/instrumentedFetch.ts +137 -0
- package/src/sdk/invoke.ts +133 -0
- package/src/sdk/mergeCacheControl.ts +150 -0
- package/src/sdk/redirects.ts +217 -0
- package/src/sdk/requestContext.ts +184 -0
- package/src/sdk/serverTimings.ts +68 -0
- package/src/sdk/signal.ts +41 -0
- package/src/sdk/sitemap.ts +143 -0
- package/src/sdk/urlUtils.ts +117 -0
- package/src/sdk/useDevice.ts +82 -0
- package/src/sdk/useId.ts +7 -0
- package/src/sdk/useScript.ts +101 -0
- package/src/sdk/workerEntry.ts +703 -0
- package/src/sdk/wrapCaughtErrors.ts +107 -0
- package/src/types/index.ts +39 -0
- package/src/types/widgets.ts +13 -0
- package/tsconfig.json +13 -0
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
# MCP Tools Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for all monitoring and logging tools available for performance audits.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## CDN Monitoring Tools
|
|
8
|
+
|
|
9
|
+
### MONITOR_SUMMARY
|
|
10
|
+
|
|
11
|
+
Get overall metrics for a site.
|
|
12
|
+
|
|
13
|
+
**Arguments**:
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"sitename": "mystore", // Required: Deco site name
|
|
17
|
+
"hostname": "www.mystore.com", // Required: Production hostname
|
|
18
|
+
"startDate": "2026-01-17", // Required: YYYY-MM-DD
|
|
19
|
+
"endDate": "2026-01-18", // Required: YYYY-MM-DD
|
|
20
|
+
"granularity": "daily", // Optional: "hourly" | "daily"
|
|
21
|
+
"filters": [] // Optional: array of filters
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Response**:
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"data": {
|
|
29
|
+
"total_requests": 20455942,
|
|
30
|
+
"total_pageviews": 0,
|
|
31
|
+
"total_bandwidth_bytes": 685685974398,
|
|
32
|
+
"cache_hit_ratio": 42.81,
|
|
33
|
+
"avg_latency_ms": 0,
|
|
34
|
+
"status_2xx_count": 16010649,
|
|
35
|
+
"status_4xx_count": 1925446,
|
|
36
|
+
"status_5xx_count": 3460,
|
|
37
|
+
"unique_countries": 152
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### MONITOR_TOP_PATHS
|
|
45
|
+
|
|
46
|
+
Get top URLs by requests or bandwidth.
|
|
47
|
+
|
|
48
|
+
**Arguments**:
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"sitename": "mystore",
|
|
52
|
+
"hostname": "www.mystore.com",
|
|
53
|
+
"startDate": "2026-01-17",
|
|
54
|
+
"endDate": "2026-01-18",
|
|
55
|
+
"limit": 20, // Optional: max results
|
|
56
|
+
"groupByPath": true, // Optional: group by path pattern
|
|
57
|
+
"granularity": "daily",
|
|
58
|
+
"orderBy": "requests", // Optional: "requests" | "bandwidth"
|
|
59
|
+
"filters": []
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Response**:
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"data": [
|
|
67
|
+
{
|
|
68
|
+
"url": "/live/invoke",
|
|
69
|
+
"total_requests": 925584,
|
|
70
|
+
"total_bandwidth_bytes": 2963108217,
|
|
71
|
+
"percentage": 4.52
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
### MONITOR_CACHE_STATUS
|
|
80
|
+
|
|
81
|
+
Get cache hit/miss breakdown.
|
|
82
|
+
|
|
83
|
+
**Arguments**:
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"sitename": "mystore",
|
|
87
|
+
"hostname": "www.mystore.com",
|
|
88
|
+
"startDate": "2026-01-17",
|
|
89
|
+
"endDate": "2026-01-18",
|
|
90
|
+
"granularity": "daily",
|
|
91
|
+
"filters": []
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Response**:
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"data": [
|
|
99
|
+
{
|
|
100
|
+
"cache_status": "hit",
|
|
101
|
+
"total_requests": 8757374,
|
|
102
|
+
"total_bandwidth_bytes": 348934491674,
|
|
103
|
+
"percentage": 42.81
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"cache_status": "miss",
|
|
107
|
+
"total_requests": 6634696,
|
|
108
|
+
"total_bandwidth_bytes": 235138161163,
|
|
109
|
+
"percentage": 32.43
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"total_requests": 20455942
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Cache Status Values**:
|
|
117
|
+
| Status | Meaning |
|
|
118
|
+
|--------|---------|
|
|
119
|
+
| hit | Served from cache |
|
|
120
|
+
| miss | Fetched from origin |
|
|
121
|
+
| expired | Cache expired, refetched |
|
|
122
|
+
| revalidated | Cache validated with origin |
|
|
123
|
+
| stale | Served stale while revalidating |
|
|
124
|
+
| updating | Being updated |
|
|
125
|
+
| unknown | No cache header present |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### MONITOR_STATUS_CODES
|
|
130
|
+
|
|
131
|
+
Get HTTP status code distribution.
|
|
132
|
+
|
|
133
|
+
**Arguments**:
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"sitename": "mystore",
|
|
137
|
+
"hostname": "www.mystore.com",
|
|
138
|
+
"startDate": "2026-01-17",
|
|
139
|
+
"endDate": "2026-01-18",
|
|
140
|
+
"granularity": "daily",
|
|
141
|
+
"filters": []
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Response**:
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"data": [
|
|
149
|
+
{
|
|
150
|
+
"status_code": 200,
|
|
151
|
+
"total_requests": 15971414,
|
|
152
|
+
"total_bandwidth_bytes": 632787067140,
|
|
153
|
+
"percentage": 84.14
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"status_code": 429,
|
|
157
|
+
"total_requests": 1287109,
|
|
158
|
+
"total_bandwidth_bytes": 13878179140,
|
|
159
|
+
"percentage": 6.78
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"total_requests": 18981459
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### MONITOR_TOP_COUNTRIES
|
|
169
|
+
|
|
170
|
+
Get traffic by country.
|
|
171
|
+
|
|
172
|
+
**Arguments**:
|
|
173
|
+
```json
|
|
174
|
+
{
|
|
175
|
+
"sitename": "mystore",
|
|
176
|
+
"hostname": "www.mystore.com",
|
|
177
|
+
"startDate": "2026-01-17",
|
|
178
|
+
"endDate": "2026-01-18",
|
|
179
|
+
"limit": 10,
|
|
180
|
+
"granularity": "daily",
|
|
181
|
+
"filters": []
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Response**:
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"data": [
|
|
189
|
+
{
|
|
190
|
+
"country": "BR",
|
|
191
|
+
"total_requests": 18500000,
|
|
192
|
+
"total_bandwidth_bytes": 600000000000,
|
|
193
|
+
"total_pageviews": 0,
|
|
194
|
+
"percentage": 90.4
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"total_requests": 20455942
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
### MONITOR_USAGE_TIMELINE
|
|
204
|
+
|
|
205
|
+
Get time series usage data.
|
|
206
|
+
|
|
207
|
+
**Arguments**:
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"sitename": "mystore",
|
|
211
|
+
"hostname": "www.mystore.com",
|
|
212
|
+
"startDate": "2026-01-17",
|
|
213
|
+
"endDate": "2026-01-18",
|
|
214
|
+
"granularity": "hourly",
|
|
215
|
+
"filters": []
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Response**:
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"data": [
|
|
223
|
+
{
|
|
224
|
+
"timestamp": "2026-01-17T00:00:00Z",
|
|
225
|
+
"total_requests": 850000,
|
|
226
|
+
"total_bandwidth_bytes": 28000000000,
|
|
227
|
+
"total_pageviews": 0,
|
|
228
|
+
"cache_hit_ratio": 43.5
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Filter Syntax
|
|
237
|
+
|
|
238
|
+
All MONITOR tools support filters:
|
|
239
|
+
|
|
240
|
+
```json
|
|
241
|
+
{
|
|
242
|
+
"filters": [
|
|
243
|
+
{
|
|
244
|
+
"type": "cache_status", // "cache_status" | "status_code" | "path" | "country"
|
|
245
|
+
"operator": "equals", // "equals" | "not_equals" | "contains" | "not_contains"
|
|
246
|
+
"value": "miss"
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Examples**:
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
// Find uncached paths
|
|
256
|
+
{ "type": "cache_status", "operator": "equals", "value": "miss" }
|
|
257
|
+
|
|
258
|
+
// Find 5xx errors
|
|
259
|
+
{ "type": "status_code", "operator": "contains", "value": "5" }
|
|
260
|
+
|
|
261
|
+
// Find product pages
|
|
262
|
+
{ "type": "path", "operator": "contains", "value": "/p" }
|
|
263
|
+
|
|
264
|
+
// Exclude static assets
|
|
265
|
+
{ "type": "path", "operator": "not_contains", "value": "/_frsh/" }
|
|
266
|
+
|
|
267
|
+
// Traffic from Brazil
|
|
268
|
+
{ "type": "country", "operator": "equals", "value": "BR" }
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Error Logging Tools
|
|
274
|
+
|
|
275
|
+
### SEARCH_LOGS
|
|
276
|
+
|
|
277
|
+
Search error logs from HyperDX.
|
|
278
|
+
|
|
279
|
+
**Arguments**:
|
|
280
|
+
```json
|
|
281
|
+
{
|
|
282
|
+
"query": "level:error site:mystore", // Required: search query
|
|
283
|
+
"startTime": 1737100800000, // Optional: epoch ms
|
|
284
|
+
"endTime": 1737187200000, // Optional: epoch ms
|
|
285
|
+
"limit": 50 // Optional: max results
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Query Syntax**:
|
|
290
|
+
- `level:error` - Error level logs
|
|
291
|
+
- `level:warn` - Warning level
|
|
292
|
+
- `site:mystore` - Specific site
|
|
293
|
+
- `service:admin` - Specific service
|
|
294
|
+
- Combine: `level:error site:mystore service:api`
|
|
295
|
+
|
|
296
|
+
**Response**:
|
|
297
|
+
```json
|
|
298
|
+
{
|
|
299
|
+
"logs": [
|
|
300
|
+
{
|
|
301
|
+
"message": "error sending request for url: ..., body error is: Too Many Requests",
|
|
302
|
+
"count": 5
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
"total": 30
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
### GET_LOG_DETAILS
|
|
312
|
+
|
|
313
|
+
Get detailed log entries with custom grouping.
|
|
314
|
+
|
|
315
|
+
**Arguments**:
|
|
316
|
+
```json
|
|
317
|
+
{
|
|
318
|
+
"query": "level:error site:mystore",
|
|
319
|
+
"groupBy": ["body", "service", "site"], // Fields to return
|
|
320
|
+
"startTime": 1737100800000,
|
|
321
|
+
"endTime": 1737187200000,
|
|
322
|
+
"limit": 20
|
|
323
|
+
}
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
**Available groupBy fields**:
|
|
327
|
+
- `body` - Log message
|
|
328
|
+
- `service` - Service name
|
|
329
|
+
- `site` - Site name
|
|
330
|
+
- `trace_id` - Trace ID
|
|
331
|
+
- `span_id` - Span ID
|
|
332
|
+
- `userEmail` - User email
|
|
333
|
+
- `env` - Environment
|
|
334
|
+
- `level` - Log level
|
|
335
|
+
|
|
336
|
+
**Response**:
|
|
337
|
+
```json
|
|
338
|
+
{
|
|
339
|
+
"fields": ["body", "service", "site"],
|
|
340
|
+
"entries": [
|
|
341
|
+
{
|
|
342
|
+
"values": ["Too Many Requests error...", "casaevideo", "casaevideo"],
|
|
343
|
+
"count": 5
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
### QUERY_CHART_DATA
|
|
352
|
+
|
|
353
|
+
Query time series aggregations.
|
|
354
|
+
|
|
355
|
+
**Arguments**:
|
|
356
|
+
```json
|
|
357
|
+
{
|
|
358
|
+
"startTime": 1737100800000,
|
|
359
|
+
"endTime": 1737187200000,
|
|
360
|
+
"granularity": "1 hour", // See granularity options
|
|
361
|
+
"series": [
|
|
362
|
+
{
|
|
363
|
+
"dataSource": "events", // "events" | "metrics"
|
|
364
|
+
"aggFn": "count", // See aggregation functions
|
|
365
|
+
"where": "level:error site:mystore",
|
|
366
|
+
"groupBy": ["service"],
|
|
367
|
+
"field": null // Required for avg, sum, etc.
|
|
368
|
+
}
|
|
369
|
+
],
|
|
370
|
+
"seriesReturnType": "column" // Optional: "column" | "ratio"
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**Granularity Options**:
|
|
375
|
+
- `30 second`, `1 minute`, `5 minute`, `10 minute`, `15 minute`, `30 minute`
|
|
376
|
+
- `1 hour`, `2 hour`, `6 hour`, `12 hour`
|
|
377
|
+
- `1 day`, `2 day`, `7 day`, `30 day`
|
|
378
|
+
|
|
379
|
+
**Aggregation Functions**:
|
|
380
|
+
- `count` - Count events
|
|
381
|
+
- `count_distinct` - Count unique values
|
|
382
|
+
- `avg`, `sum`, `min`, `max` - Numeric aggregations (need `field`)
|
|
383
|
+
- `p50`, `p90`, `p95`, `p99` - Percentiles (need `field`)
|
|
384
|
+
|
|
385
|
+
**Response**:
|
|
386
|
+
```json
|
|
387
|
+
{
|
|
388
|
+
"data": [
|
|
389
|
+
{
|
|
390
|
+
"ts_bucket": 1737100800000,
|
|
391
|
+
"group": ["mystore"],
|
|
392
|
+
"series_0.data": 6
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"ts_bucket": 1737104400000,
|
|
396
|
+
"group": ["mystore"],
|
|
397
|
+
"series_0.data": 101
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
## Documentation Search
|
|
406
|
+
|
|
407
|
+
### SearchDecoCx
|
|
408
|
+
|
|
409
|
+
Search Deco.cx documentation.
|
|
410
|
+
|
|
411
|
+
**Arguments**:
|
|
412
|
+
```json
|
|
413
|
+
{
|
|
414
|
+
"query": "caching loaders stale-while-revalidate"
|
|
415
|
+
}
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
**Response**:
|
|
419
|
+
Multiple documentation sections with:
|
|
420
|
+
- Title
|
|
421
|
+
- Link
|
|
422
|
+
- Content excerpt
|
|
423
|
+
|
|
424
|
+
**Use Cases**:
|
|
425
|
+
- Understand Deco patterns
|
|
426
|
+
- Find caching strategies
|
|
427
|
+
- Learn about loader optimization
|
|
428
|
+
- Understand section lifecycle
|