Builds PaperTrail from the base skeleton into a full evidence-verification platform for the "Built with Claude: Life Sciences" hackathon (Builder Track). New named-user features (Build Beyond the Bench): - Lab Notebook Companion — rough bench notes -> structured, searchable, grounded experiment records (lib/labNotebook, /console/lab-notebook, migration 0059) - Clinical Trial Matcher — de-identified patient notes -> ranked eligible ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning (lib/trialMatcher, /console/trial-matcher, migrations 0060) Platform: - Deterministic verification moat (biostats recompute, exact-span grounding) - 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar, PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier) - Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise governance (RBAC, /api/v1 gateway, metering, audit chain, retention) - 17 OSS projects assimilated into native TypeScript on our stack (backend/engines retained + credited in NOTICE) - Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site - Next.js 16 upgrade, benchmark harness (honest smoke-test caveat) Licensing: Apache-2.0 (LICENSE + NOTICE).
3.6 KiB
Users deploying R2R into production settings benefit from robust, persistant logging. R2R supports this via Victorialogs, open source user-friendly database for logs from VictoriaMetrics.
Victorialogs ships by default with the full version of R2R and hosts a UI to view your logs at http://localhost:9428/select/vmui.
Accessing Logs
VictoriaLogs UI
The easiest way to view logs is through the VictoriaLogs UI:
Navigate to http://localhost:9428/select/vmui.
Use the query box to search for specific log entries.
Adjust the time range as needed using the time controls
Common Query Examples
Here are some useful queries for finding specific log information:
# View all logs
*
# View logs with [ERROR] tag
{log=~"\\[ERROR\\].*"}
# View logs with error-related content
{log=~".*error.*"}
{log=~".*exception.*"}
{log=~".*traceback.*"}
{log=~".*failed.*"}
# View logs with warning content
{log=~".*WARNING.*"}
# View logs about a specific process
{log=~".*ingestion.*"}
# View specific error types
{log=~".*HTTPException.*"}
{log=~".*ValueError.*"}
# View Azure OpenAI-related errors
{log=~".*OpenAI.*"}
Troubleshooting Common Issues
No Logs Showing Up
If you don't see any logs:
- Increase the time range - logs might be outside your current time window
- Check if Fluent Bit is running:
docker ps | grep fluent-bit - Check VictoriaLogs is running:
docker ps | grep victoria-logs - Verify your R2R container is properly configured for logging
Understanding Error Logs
When you see an error in the logs, it typically follows this pattern:
- Error message with timestamp
- A traceback showing the sequence of function calls
- The specific error and its cause
Look for the actual error message at the bottom of a traceback to understand the root cause.
Advanced Configuration
Customizing Fluent Bit
If you need to customize how logs are collected and processed, you can modify the Fluent Bit configuration:
- Create/edit the
fluent-bit.conffile in your./fluent-bitdirectory - Restart the Fluent Bit container:
docker restart docker-fluent-bit-1
Setting Up Grafana for Log Visualization
For more advanced visualization, you can connect Grafana to VictoriaLogs:
-
Access Grafana at http://localhost:3001
-
Add a new VictoriaLogs data source:
- Go to Configuration > Data Sources > Add data source
- Select "VictoriaMetrics Logs"
- Set URL to http://victoria-logs:9428
- Save and test the connection
-
Create a new dashboard with a Logs panel
-
Configure the panel to query logs using the same query syntax as in the VictoriaLogs UI
Retention Policy
By default, logs are retained for 60 days as configured in the Docker Compose file:
victoria-logs:
image: victoriametrics/victoria-logs:v1.10.1-victorialogs
command: -storageDataPath=/data -retentionPeriod=60d
To change the retention period, modify the -retentionPeriod parameter and restart the container.
Log Format
Each log entry contains:
_time: Timestamp of the logcontainer_name: Source containerlog: The actual log message- Additional metadata
When searching logs, you'll typically want to search for content in the log field.