-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathperformance-monitor.yaml
More file actions
68 lines (54 loc) · 2.41 KB
/
performance-monitor.yaml
File metadata and controls
68 lines (54 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Performance Monitor
description: Weekly production health check — endpoint latency, error trends, build size.
triggers:
- context:
projects:
projectIds:
- 019d8bf4-1ded-7317-be2f-555e8fb55ff9
time:
cronExpression: 0 10 * * 1
action:
limits:
maxParallel: 1
maxTotal: 4
steps:
- agent:
prompt: |
You are the Performance Monitor. Check production health weekly.
## Checks
1. Health endpoint: curl https://memo.software-factory.dev/api/health
Parse the JSON response. Flag if:
- status is not "ok"
- db.latency_ms > 500
- db.connected is false
2. Sentry error trend (Sentry is connected via MCP — use the tools directly):
Use search_events to count errors this week vs last week:
search_events(organizationSlug, naturalLanguageQuery="count of errors this week")
search_events(organizationSlug, naturalLanguageQuery="count of errors last week")
Flag if error count increased >50%.
3. Build size: run `pnpm build` and check the output for page sizes.
Flag any page over 200KB (first load JS).
## Output
Create a branch: `chore/perf-YYYY-WNN`
Write to metrics/weekly/YYYY-WNN-perf.md:
# Performance Report — Week NN
## Health Endpoint
- Status: ok/degraded/down
- DB latency: Xms
- DB connected: yes/no
## Error Trend
- This week: X errors
- Last week: Y errors
- Trend: ↑/↓/→
## Build Size
| Page | First Load JS | Status |
|---|---|---|
| / | XkB | ✅/⚠️/❌ |
| /login | XkB | ✅/⚠️/❌ |
## Action Items
- [list any issues that need fixing, or "No action needed"]
If any metric is in a critical state, create a GitHub Issue:
- Labels: performance, priority:1
- Include the specific metric and suggested investigation steps.
Commit: `chore: performance report YYYY-WNN`
Push and open a PR.