Overview
Sentry monitors runtime errors and crashes during the Dream Foundry competition. When agents fail, Sentry captures detailed error context to help understand failure modes and improve agent reliability.Sentry integration is optional. If not configured, Dream Foundry runs normally but without error tracking.
Why Sentry?
In a competitive multi-agent environment, understanding why an agent failed is just as important as knowing that it failed:- Error context: Stack traces, variable values, environment state
- Frequency patterns: Is this a one-time crash or consistent failure?
- Performance impact: How do errors affect scoring?
- Debugging data: Real production errors from sandbox execution
Setup and Configuration
Create Sentry Project
Sign up at sentry.io and create a new Python project.
Initialization
Sentry is initialized automatically when Dream Foundry starts:forge.py
The
traces_sample_rate=1.0 means Sentry captures 100% of transactions. Lower this in production to reduce costs.Error Capture
Automatic Capture
When a candidate agent crashes, Sentry automatically captures the error:forge.py
What Gets Captured
Context and Tags
Each error includes contextual information:Automatic Context
- Environment:
forge(identifies Dream Foundry errors) - Release:
candidate-{id}(which agent failed) - Timestamp: When the error occurred
- Stack trace: Full call stack at error point
Custom Tags
You can add custom context to errors:Viewing Errors in Sentry
Issues Dashboard
After running the forge, check your Sentry project dashboard:- Navigate to Issues → All Issues
- Filter by
candidate_idtag to see agent-specific failures - Click an issue to see:
- Full stack trace
- Error message and context
- Environment details
- Frequency and user impact
Example Error
Here’s what a captured error looks like for Agent Delta (The Crasher):Flushing Events
Sentry batches events and sends them asynchronously. For immediate visibility (like in demos), flush manually:Impact on Scoring
Sentry doesn’t directly affect scoring, but the errors it captures do:Success Metric (20%)
If Sentry captures an error for a candidate:- The candidate likely failed to produce output
- Success score = 0 points
Reliability Insights
Sentry helps identify:- Flaky agents: Intermittent failures
- Environment issues: Sandbox-specific errors
- Data quality problems: Parsing or validation errors
Best Practices
Troubleshooting
Events Not Appearing
Problem: Errors aren’t showing up in Sentry dashboard. Solutions:- Check DSN is correct in
.env - Verify Sentry SDK is installed:
pip list | grep sentry - Force flush:
sentry_sdk.flush(timeout=5.0) - Check network connectivity to
sentry.io
Too Many Events
Problem: Hitting Sentry rate limits or quota. Solutions:- Lower sample rate:
traces_sample_rate=0.1 - Add filters to ignore noisy errors
- Upgrade Sentry plan for higher quota
Missing Context
Problem: Errors lack useful debugging information. Solutions:- Add custom tags:
sentry_sdk.set_tag("key", "value") - Include breadcrumbs:
sentry_sdk.add_breadcrumb(message="Step X") - Set user context:
sentry_sdk.set_user({"id": candidate_id})