Skip to content

Commit 1198a65

Browse files
committed
Simplify crons index page and add critical product strategy questions
- Simplify crons/index.mdx: Remove heavy card components, change 'easiest' to 'recommended' - Add PRFAQ open questions: What's the bare minimum for working cron monitoring? - Clarify UI-first vs code-first approach and define 'easiest' vs 'most complete' - Ready for team review on product strategy and simplified UX
1 parent 1c48da9 commit 1198a65

File tree

2 files changed

+78
-80
lines changed
  • .cursor/project/features/005-unified-cron-monitoring-experience
  • docs/platforms/javascript/common/crons

2 files changed

+78
-80
lines changed

.cursor/project/features/005-unified-cron-monitoring-experience/PRFAQ.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,38 @@ A **Unified Cron Monitoring Experience** that clarifies the two-step process and
155155
- Scan for existing cron-related code patterns
156156
- Suggest optimal integration approach based on tech stack
157157

158+
## 🔍 Open Questions
159+
160+
**PRIORITY 1: What is the bare minimum to get working cron monitoring?**
161+
162+
**Option A: Code-First Approach**
163+
- Developer adds `Sentry.captureCheckIn()` calls to existing cron job
164+
- Gets cron execution signals in Sentry immediately
165+
-**But does this create alerts by default? Or just raw data?**
166+
-**Do they need to finish setup in the UI afterwards for alerting?**
167+
168+
**Option B: UI-First Approach**
169+
- Developer creates monitor definition in Sentry UI (includes alert configuration)
170+
- Then adds minimal instrumentation code to their job
171+
- Gets both execution data AND configured alerts immediately
172+
173+
**Key Questions:**
174+
1. **What's the ideal customer flow we want to encourage?** UI-first or code-first?
175+
2. **What does "easiest" actually mean?** Least code changes vs most value vs fastest time-to-alerts?
176+
3. **Should we position UI setup as "most complete" rather than "easiest"?**
177+
4. **Does bare-minimum code instrumentation provide enough value without UI configuration?**
178+
179+
**PRIORITY 2: How do we define "easiest" vs "most valuable"?**
180+
181+
Current documentation positions UI setup as "easiest" but this may be misleading:
182+
- **UI Setup**: More setup steps, but provides complete monitoring + alerting
183+
- **Code-only**: Fewer steps, but may provide incomplete monitoring experience
184+
185+
We need to clarify whether we're optimizing for:
186+
- **Minimal code changes** (technical ease)
187+
- **Fastest time to value** (getting alerts working)
188+
- **Most complete monitoring** (full feature set)
189+
158190
## ❓ Frequently Asked Questions
159191

160192
**Q: Why not just improve the existing documentation instead of changing the product?**

docs/platforms/javascript/common/crons/index.mdx

Lines changed: 46 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -27,85 +27,51 @@ supported:
2727

2828
Monitor the uptime and performance of your scheduled jobs in Node.js. Get alerts when jobs fail, timeout, or don't run as expected.
2929

30-
## Choose Your Setup Method
31-
32-
Select the approach that best fits your needs:
33-
34-
<div className="flex flex-wrap gap-4 mb-8">
35-
<div className="w-full md:w-[calc(50%-8px)] p-6 border rounded-lg bg-white dark:bg-gray-800 shadow-sm">
36-
<div className="flex items-center gap-2 mb-2">
37-
<h3 className="text-lg font-medium m-0">UI Setup</h3>
38-
<span className="px-2 py-1 text-xs bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 rounded">Easiest</span>
39-
</div>
40-
<p className="text-sm text-gray-600 dark:text-gray-300 mb-3">Create monitors in Sentry's web interface. No code changes required.</p>
41-
<p className="text-sm font-medium text-purple-600 dark:text-purple-400 mb-0">Best for: Simple scripts, getting started quickly</p>
42-
<div className="mt-4">
43-
<a href="ui-setup" className="inline-block px-4 py-2 bg-purple-600 text-white rounded hover:bg-purple-700 text-sm font-medium">
44-
Get Started →
45-
</a>
46-
</div>
47-
</div>
48-
49-
<div className="w-full md:w-[calc(50%-8px)] p-6 border rounded-lg bg-white dark:bg-gray-800 shadow-sm">
50-
<div className="flex items-center gap-2 mb-2">
51-
<h3 className="text-lg font-medium m-0">Automatic</h3>
52-
<span className="px-2 py-1 text-xs bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded">Recommended</span>
53-
</div>
54-
<p className="text-sm text-gray-600 dark:text-gray-300 mb-3">Auto-instrument existing cron libraries with minimal code changes.</p>
55-
<p className="text-sm font-medium text-purple-600 dark:text-purple-400 mb-0">Best for: Apps using node-cron, cron, or node-schedule</p>
56-
<div className="mt-4">
57-
<a href="automatic" className="inline-block px-4 py-2 bg-purple-600 text-white rounded hover:bg-purple-700 text-sm font-medium">
58-
Get Started →
59-
</a>
60-
</div>
61-
</div>
62-
63-
<div className="w-full md:w-[calc(50%-8px)] p-6 border rounded-lg bg-white dark:bg-gray-800 shadow-sm">
64-
<div className="flex items-center gap-2 mb-2">
65-
<h3 className="text-lg font-medium m-0">Manual Integration</h3>
66-
</div>
67-
<p className="text-sm text-gray-600 dark:text-gray-300 mb-3">Full SDK integration with custom status updates and error handling.</p>
68-
<p className="text-sm font-medium text-purple-600 dark:text-purple-400 mb-0">Best for: Custom cron logic, maximum control</p>
69-
<div className="mt-4">
70-
<a href="manual" className="inline-block px-4 py-2 bg-purple-600 text-white rounded hover:bg-purple-700 text-sm font-medium">
71-
Get Started →
72-
</a>
73-
</div>
74-
</div>
75-
76-
<div className="w-full md:w-[calc(50%-8px)] p-6 border rounded-lg bg-white dark:bg-gray-800 shadow-sm">
77-
<div className="flex items-center gap-2 mb-2">
78-
<h3 className="text-lg font-medium m-0">Advanced Setup</h3>
79-
</div>
80-
<p className="text-sm text-gray-600 dark:text-gray-300 mb-3">Programmatically create and manage monitors via code.</p>
81-
<p className="text-sm font-medium text-purple-600 dark:text-purple-400 mb-0">Best for: CI/CD pipelines, managing many monitors</p>
82-
<div className="mt-4">
83-
<a href="advanced" className="inline-block px-4 py-2 bg-purple-600 text-white rounded hover:bg-purple-700 text-sm font-medium">
84-
Get Started →
85-
</a>
86-
</div>
87-
</div>
88-
</div>
89-
90-
91-
92-
## Not Sure Which to Choose?
93-
94-
- **Just want notifications?**[UI Setup](ui-setup)
95-
- **Using node-cron or similar?**[Automatic](automatic)
96-
- **Need custom error handling?**[Manual Integration](manual)
97-
- **Managing 10+ monitors?**[Advanced Setup](advanced)
98-
99-
## What You'll Get
100-
101-
Once set up, Sentry cron monitoring provides:
102-
103-
- **Failure Alerts**: Get notified when jobs don't run as expected
104-
- **Timeout Detection**: Catch jobs that exceed their maximum runtime
105-
- **Timeline View**: See a visual history of your job executions
106-
- **Error Integration**: Connect runtime errors to specific job runs
107-
- **Issue Management**: Automatically create and resolve issues based on job health
108-
109-
## Learn More
30+
{/* ![Cron Monitoring Setup](placeholder-cron-setup.gif) */}
31+
32+
## UI Setup (Recommended)
33+
34+
The most complete way to monitor your crons is by creating monitors in Sentry's web interface:
35+
36+
1. Create monitor in Sentry UI with your cron schedule
37+
2. Add notification code to your job
38+
3. Get alerts when jobs fail or don't run
39+
40+
This approach gives you complete monitoring setup including alerts configuration.
41+
42+
## Setup Methods
43+
44+
Choose the method that matches your current setup:
45+
46+
* [UI Setup](ui-setup) - Create monitors in Sentry's web interface
47+
* [Automatic Integration](automatic) - Auto-instrument existing cron libraries
48+
* [Manual Integration](manual) - Full SDK integration with custom handling
49+
* [Advanced Setup](advanced) - Programmatically create and manage monitors
50+
51+
### Automatic Integration
52+
53+
* [node-cron](automatic#node-cron)
54+
* [cron](automatic#cron-library)
55+
* [node-schedule](automatic#node-schedule)
56+
57+
If you're using one of these popular cron libraries, use the automatic integration for seamless monitoring.
58+
59+
### Manual Integration
60+
61+
* [withMonitor() wrapper](manual#withmonitor)
62+
* [captureCheckIn() calls](manual#capturecheckin)
63+
* [Custom error handling](manual#error-handling)
64+
65+
## Other Tools
66+
67+
If you have custom cron logic or use a different scheduling library, we recommend the [manual integration approach](manual) which gives you full control over when and how check-ins are sent.
68+
69+
For advanced use cases like CI/CD pipelines or managing many monitors, consider the [programmatic setup](advanced) which lets you create monitors via code.
70+
71+
## Additional Resources
72+
73+
* [Troubleshooting Cron Monitoring](troubleshooting)
74+
* [Cron Monitoring Best Practices](https://blog.sentry.io/cron-monitoring-best-practices)
75+
* [Debugging Failed Cron Jobs](https://blog.sentry.io/debugging-cron-jobs)
11076

11177
<PageGrid />

0 commit comments

Comments
 (0)