Repository navigation
fix: keep marimo running when tracing dependencies are missing - #10758
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
🟡 Changes recommended
There is a functional gap where tracing isn’t fully disabled (request-path still attempts OpenTelemetry imports), and the new subprocess test script construction is likely to fail due to indentation.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR makes tracing truly optional: when MARIMO_TRACING=1 but OpenTelemetry isn’t available (common in isolated/sandboxed environments), marimo should still start, emit a single actionable warning, and use no-op tracers for the rest of the process. It also ensures editable sandbox installs preserve requested marimo extras.
Changes:
- Initialize tracing once at import-time and fall back to no-op tracing when OpenTelemetry cannot be imported or initialization fails.
- Preserve
additional_features(extras) when marimo is installed editable in sandboxes. - Add tests and docs to cover “missing OpenTelemetry should not prevent startup” behavior.
File summaries
| File | Description |
|---|---|
marimo/_tracer.py |
Adds one-time tracing initialization with warning + no-op fallback; wires tracers off a global availability flag. |
tests/test_tracer.py |
Updates tracer tests to reflect one-time initialization; adds subprocess test ensuring import marimo works without OpenTelemetry. |
marimo/_cli/sandbox.py |
Preserves extras for editable marimo sandbox dependencies (-e /path[extras]). |
tests/_cli/test_sandbox.py |
Extends sandbox dependency normalization tests for editable installs retaining extras. |
development_docs/traces.md |
Documents that missing tracing deps disables tracing but keeps marimo running. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
45ee258 to
f010eb5
Compare
📝 Summary
MARIMO_TRACING=1currently prevents marimo from starting when OpenTelemetry is unavailable, including inside isolated notebook sandboxes. Tracing is an optional observability feature and must not make the application unavailable.This change initializes tracing once and selects either the OpenTelemetry backend or no-op tracers. Missing or incomplete OpenTelemetry installations now produce one actionable warning and disable tracing for that process. Editable sandbox installs also retain requested marimo extras instead of silently dropping them.
Seems the only simple way to run with otel is this
uv add --script new_file.py 'marimo[otel]' MARIMO_TRACING=1 marimo edit --sandbox new_file.py📋 Pre-Review Checklist
✅ Merge Checklist