Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

fix(api): DELETE /sandboxes/{id} returns 500/404 with no structured log — root cause invisible

オープン
#3,529 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
58/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
go

調査の方向性

DeleteSandboxesSandboxID handler から開始し、ErrSandboxOperationFailed、not-found パス、deleteSnapshot の失敗を含む、各 terminal error ブランチを調査します。文書化された DELETE シナリオを再現し、その後、各レスポンスによって sandbox_id、team_id、および完全なエラーを適切なレベルで含む構造化ログが生成されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Problem

DeleteSandboxesSandboxID can return HTTP 500 or 404 with no structured log entry that explains why, making production incidents hard to diagnose.

500 — ErrSandboxOperationFailed path has no log at all
case errors.Is(err, orchestrator.ErrSandboxOperationFailed):
    a.sendAPIStoreError(c, http.StatusInternalServerError, ...)  // no log, no telemetry
    return

This is the most common 500 cause (node unreachable, gRPC error during kill), yet nothing is written to Loki and no span error is recorded. The only signal is the ALB upstream status code.

404 — logged at Debug level, missing teamID
logger.L().Debug(ctx, "Sandbox not found for deletion", logger.WithSandboxID(sandboxID))

Debug level is suppressed in production by default, so 404 responses leave no queryable trace. There is also no teamID field, preventing per-team filtering.

deleteSnapshot failure message is ambiguous

telemetry.ReportError(ctx, "error deleting sandbox", ...) does not distinguish between a kill failure and a snapshot DB failure.

Impact

  • On-call cannot distinguish node crash (500) from DB error (500) without reading gRPC traces
  • 404 frequency per team is invisible — no Loki query possible
  • Incident response requires guessing which layer failed

Reproduction

Any DELETE /sandboxes/{id} where:

  • The orchestrator node is unreachable → 500 with zero log
  • The sandbox never existed → 404 with zero visible log

Expected behaviour

Each terminal branch emits a structured log at the appropriate level (Error / Info) with sandbox_id, team_id, and the full error field so operators can query Loki directly.

主要言語
Go
スター
1.6k
フォーク
438
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

e2b-dev/runtime のほかの issue

e2b-dev/runtime の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。