modal-observability
Skill4 starsChanged 3 months agoApache-2.0View on GitHub
Modal runtime logs and debugging (modal app logs, modal container logs, shell, exec, enable_output, MODAL_LOGLEVEL, Live Profiling, dashboard URLs), plus metrics and integrations (Datadog, OpenTelemetry, Slack, GPU metrics, audit logs). Use whenever inspecting App/container/sandbox output or diagnosing failures, OOMs, timeouts, or hangs.
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Prefer modal container logs <ta-*|sb-*> --all once you have a container/sandbox ID.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Modal Observability
Domain skill for runtime logs, debugging, metrics, and integrations.
For the full logs/debug module, read logging-debugging.md — it is self-contained (decision tree, all log CLI flags, shell/exec, interact, env vars, symptom table).
When to Use This Skill
- Fetching or streaming App / container / Sandbox logs
- Missing logs, failures, OOMs, timeouts, hung containers
modal shell,modal container exec,modal run -i/modal.interact()modal.enable_output(),MODAL_LOGLEVEL,MODAL_TRACEBACK- Opening dashboard URLs for objects from code / CLI
- Datadog, OpenTelemetry, Slack alerts
- GPU metrics / health
- Enterprise audit logs (workspace actions, not stdout)
Logs and debugging
→ logging-debugging.md (complete module)
Agent defaults (summary)
- Finite fetch by default — do not pass
-funless streaming is required. - CLI default is last 100 lines then exit (changed in SDK 1.4+).
- Prefer
modal container logs <ta-*|sb-*> --allonce you have a container/sandbox ID. --source stderr|stdout|system; add--timestampsand--show-*-idwhen correlating.
Quick commands
modal app logs my-app --since 2h --source stderr --timestamps \
--show-function-id --show-function-call-id --show-container-id
modal container list --app-id ap-… --json
modal container logs ta-… --all --timestamps
modal container logs sb-… --all
modal shell ta-… # running container
modal shell script.py::fn # fresh image/spec (not live task)
modal container exec ta-… -- ps aux
MODAL_LOGLEVEL=DEBUG modal run hello.pywith modal.enable_output():
with app.run():
fn.remote()Dashboard URLs
Most Modal objects expose .get_dashboard_url() for deep links (logs, metrics, browsers):
fc = f.spawn(arg)
print(fc.get_dashboard_url())CLI helpers:
modal dashboard # Apps homepage for current environment
modal dashboard <object-id>
modal app dashboard <app-name>
modal volume dashboard <volume-name>GPU Metrics
| Metric | What It Measures |
| GPU Utilization % | Time in CUDA kernels (nvidia-smi-style occupancy) |
| GPU Power Utilization % | Fraction of max power — best proxy for real work |
| GPU Temperature | Die °C |
| GPU Memory Used | Allocated GPU memory |
GPU utilization % ≠ compute efficiency; prefer power utilization when judging useful GPU work.
Details: gpu-monitoring.md.
GPU Health
Modal detects ECC / hardware faults and retries on healthy GPUs automatically.
Integrations
Setup detail: integrations.md.
- Datadog — dashboard Settings → Integrations → Datadog (metrics, lifecycle, Function logs)
- OpenTelemetry — OTLP endpoint; spans for invocations, container lifecycle, image builds
- Slack (Beta) — scheduled Function failure / timeout / OOM alerts
Audit Logs (Enterprise)
Workspace actions only (app.deploy, secret.create, …) — not Function stdout or Sandbox exec. Filters: key:value, negate with -.
→ audit-logs.md
Go / TypeScript client telemetry
gRPC unary interceptors (Go) or middleware (TS) on ModalClient for SDK RPC tracing. Runtime App logs still come from Python Functions + the log CLI above.
Crash / performance triage
| Symptom | Likely cause | Fix |
| OOM kill | Memory limit | Raise memory; confirm via --source system logs |
| Container timeout | Exceeded timeout | Raise timeout or optimize |
| Cold start slow | Large image / imports | Memory snapshots, thinner images, @modal.enter |
| GPU not detected | Bad image / CUDA | Proper CUDA base image |
| Import error in container | Missing package | Fix Image; verify with modal shell script.py::fn |
Disk OSError | Ephemeral disk full | Larger ephemeral_disk |
Overlay deployments on dashboard metric charts to correlate regressions with deploys.
References (this skill)
- logging-debugging.md — logs + debug CLI (complete)
- integrations.md — Datadog, OTel, Slack
- audit-logs.md — audit actions / filters
- gpu-monitoring.md — GPU metrics detail
Guardrails
- Log CLI does not follow by default — last 100 then exit; pass
--followfor live streams --allis container/sandbox only, notmodal app logs- Audit logs ≠ application logs (workspace actions only)
- Historical CLI logs respect plan retention
- GPU util % is occupancy, not efficiency
- Slack notifications require Beta access
- OpenTelemetry exports add minor overhead; keep sampling rate reasonable
In this repository80 other files it gives its agents.
- a11y-accessibility-designSkill
- agentic-ui-patternsSkill
- ai-native-ui-designSkill
- ai-ui-anti-patternsSkill
- ai-ui-heuristicsSkill
- calm-technology-uiSkill
- conversion-growth-designSkill
- cross-platform-designSkill
- dark-mode-designSkill
- data-visualizationSkill
- design-systemsSkill
- design-thinking-processSkill
- error-empty-statesSkill
- ethical-design-patternsSkill
- form-uxSkill
- information-architectureSkill
- interaction-design-patternsSkill
- internationalization-uiSkill
- mobile-touch-designSkill
- modal-classes-lifecycleSkill
- modal-container-imagesSkill
- modal-dicts-queuesSkill
- modal-endpointsSkill
- modal-fundamentalsSkill
- modal-gpu-computeSkill
- modal-networkingSkill
- modal-parallel-executionSkill
- modal-sandboxesSkill
- modal-scaling-performanceSkill
- modal-schedulingSkill
- modal-secretsSkill
- modal-serversSkill
- modal-storageSkill
- modal-web-servingSkill
- modal-workspace-adminSkill
- motion-design-principlesSkill
- notifications-permissionsSkill
- onboarding-uxSkill
- rust-api-designSkill
- rust-async-programmingSkill
- rust-cargo-masterySkill
- rust-cli-applicationsSkill
- rust-clippy-lintsSkill
- rust-closures-iteratorsSkill
- rust-compiler-internalsSkill
- rust-concurrencySkill
- rust-design-patternsSkill
- rust-editionsSkill
- rust-embeddedSkill
- rust-error-handlingSkill
- rust-game-developmentSkill
- rust-lifetimes-borrowingSkill
- rust-macrosSkill
- rust-performanceSkill
- rust-rustdocSkill
- rust-rustup-toolchainSkill
- rust-smart-pointersSkill
- rust-testing-benchmarkingSkill
- rust-type-systemSkill
- rust-unsafe-ffiSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

