E2B
Send metrics and logs from E2B sandboxes to Oodle with the E2B OTel telemetry export.
E2B sends the CPU, memory and disk of every sandbox, the sandbox count of your team, and sandbox lifecycle logs over OTLP HTTP. E2B sends them straight to Oodle, so you run no collector.
Oodle ships an E2B dashboard and three recommended monitors. You provision both from the integration tile.
Prerequisites
- An E2B Enterprise or BYOC plan. E2B makes the telemetry export available on these plans only, and the E2B team turns it on for your team.
OODLE_INSTANCE: Your Oodle instance ID. Go to theSettingsicon ->API Keyspage in your Oodle UI to find it. (Oodle UI links: ap1, us1)OODLE_API_KEY: Your Oodle API key for authentication. Go to theSettingsicon ->API Keysin your Oodle UI to choose an appropriate key. (Oodle UI links: ap1, us1)- An Oodle account (navigate to ap1, us1 to start setup)
Ask E2B for the export
There is no setting for the export in the E2B console or SDK. Give these values
to E2B support or to [email protected]. The E2B tile in Oodle shows them with
your instance values filled in.
endpoint: "https://<OODLE_INSTANCE>-otlp.collector.oodle.ai"
protocol: "http/protobuf"
headers:
X-OODLE-INSTANCE: "<OODLE_INSTANCE>"
X-API-KEY: "<OODLE_API_KEY>"
E2B adds /v1/metrics and /v1/logs to the endpoint. Use a dedicated API key,
so that you can revoke it without effect on other senders.
Verify
E2B exports only while sandboxes run, so start one or more sandboxes first.
- Go to ap1, us1 and search for
e2b_sandbox_cpu_used. There is one series for each running sandbox. - Go to ap1, us1 and filter on
service: e2b. Look forSandbox createdandSandbox stoppedlines. - Open the E2B tile (ap1, us1) and provision the dashboard and monitors.
Dashboard
Open the Dashboards tab in the E2B tile and click Provision & View Dashboards. Provisioning overwrites by name, so it is safe to repeat.
The E2B Sandboxes dashboard has two rows:
| Row | Covers |
|---|---|
| Fleet | Running sandboxes, peak running sandboxes, sandbox starts, vCPUs in use against allocated, memory used against allocated |
| Sandboxes | CPU, memory, disk and page cache of each sandbox, and the busiest sandboxes by peak CPU and memory |
The Team, Sandbox type and Sandbox variables filter every panel.
Monitors
Open the Monitors tab in the tile and click Provision Recommended Monitors. Monitors are matched by name, so your edits are kept and provisioning again restores only the ones you removed.
| Monitor | Severity | Fires when |
|---|---|---|
| E2B Sandbox CPU Saturated | Warning | A sandbox uses more than 90% of its vCPUs for 10 minutes |
| E2B Sandbox Memory Near Limit | Warning, Critical | A sandbox uses more than 85% (warning) or 95% (critical) of its memory for 5 minutes |
| E2B Sandbox Disk Near Full | Warning, Critical | A sandbox uses more than 85% (warning) or 95% (critical) of its disk for 5 minutes |
Metrics collected
E2B names its metrics e2b.*. Oodle stores them with underscores.
| Metric | Type | Description |
|---|---|---|
e2b_sandbox_cpu_used | Gauge | CPU usage, as a percent of the sandbox vCPUs |
e2b_sandbox_cpu_total | Gauge | vCPUs of the sandbox |
e2b_sandbox_ram_used | Gauge | Used memory in bytes, without the page cache |
e2b_sandbox_ram_cache | Gauge | Memory that the page cache uses, in bytes |
e2b_sandbox_ram_total | Gauge | Memory of the sandbox, in bytes |
e2b_sandbox_disk_used | Gauge | Used disk, in bytes |
e2b_sandbox_disk_total | Gauge | Disk of the sandbox, in bytes |
e2b_team_sandbox_running | Gauge | Sandboxes that run now |
e2b_team_sandbox_created | Counter | Sandboxes started. A resume of a paused sandbox counts as a start. |
Every sandbox metric has the sandbox_id, team_id, build_id and
sandbox_type labels. Team metrics have team_id.
E2B samples the sandbox gauges every 5 seconds. When a sandbox stops, E2B stops its samples too.
A plain selector keeps the last value for the 5 minute query lookback, so a
stopped sandbox still shows for a few minutes. To drop a stopped sandbox
sooner, the dashboard reads each gauge with last_over_time(...[30s]) and the
monitors with last_over_time(...[1m]). The monitors use the longer window so
that a late sample does not hide a sandbox.
When a paused sandbox resumes, its gauges can start a second series with new
labels, so group by sandbox_id to count each sandbox once.
Logs collected
Every log record has service: e2b. The records include:
- Sandbox lifecycle:
Sandbox created,Pausing sandbox,Started resuming sandbox,Killing sandbox,Sandbox stopped - Processes in a sandbox:
Process with pid <pid> startedandended - CPU warnings:
CPU usage threshold exceeded, with thecpu_used_percentandcpu_threshold_percentattributes
The sandbox_id, team_id, template_id and logger attributes are on every
record. The logger attribute names the E2B component that wrote it, for
example orchestrator, orchestration-api, envd or process.
Troubleshooting
| Issue | Resolution |
|---|---|
| No metrics or logs arrive | Start a sandbox. E2B exports only while sandboxes run. |
| Still no data with a running sandbox | Ask E2B to confirm that the export is on for your team ID, and that it uses the endpoint and headers above. |
| Metrics arrive but logs do not | Ask E2B to confirm that it sends logs to the same endpoint. |
| The sandbox count is higher than the running count | A stopped sandbox shows until its last sample leaves the query window. Use e2b_team_sandbox_running for the exact count. |
Demo
A workload that starts sandboxes and puts CPU, memory and disk load on them is in oodle-onboarding.
Support
If you need assistance or have any questions, please reach out to us through:
- Email at [email protected]