Skip to content

telemetry: turnaways and retried conflicts are not errors - #54

Merged
rlrs merged 1 commit into
mainfrom
fix/deferrals-are-not-errors
Oct 31, 2026
Merged

rlrs merged 1 commit into
mainfrom
fix/deferrals-are-not-errors

Conversation

@rlrs

@rlrs rlrs commented Oct 31, 2026

Copy link
Copy Markdown
Owner

A cold start on prod logged ~2,100 `gateway.sandbox_create` errors and ~27,000 `routing.transaction` errors in 15 minutes, while clients saw 2 503s against ~12,700 successful creates. They were:

  • creates and groups turned away until capacity exists (503 `no_ready_node` / `sandbox_group_incomplete`), which clients retry;
  • PostgreSQL serialization conflicts that rolled back and were retried.

These now count as `status="deferred"` and `status="conflict"` in `ucloud_platform_operation_count_total`. Their spans are not marked as errors; they carry a `ucloud.outcome` attribute instead. A later 5xx response or the raised conflict does not override the outcome. A transaction that runs out of retries still fails its caller as `error`. The dashboard's failure panels filter on `error`, so they now show only real failures.

Test: `tests/test_telemetry.py::test_turnaways_and_conflicts_are_counted_apart_from_errors` (fails without the change). The full suite with Postgres passes.

🤖 Generated with Claude Code

A create or group turned away until capacity exists now counts as
status "deferred", and a routing transaction rolled back by a
serialization conflict (and retried) as "conflict". Both were counted
and traced as errors: a cold start logged thousands of each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rlrs
rlrs merged commit 7d68f6a into main Oct 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant