Skip to content

feat(api): count vCons enqueued to ingress lists via the API#193

Merged
pavanputhra merged 1 commit into
mainfrom
pavankumar/con-618-add-enqueue-side-vcon-counter-so-the-chain-stall-alert-can
Jun 11, 2026
Merged

feat(api): count vCons enqueued to ingress lists via the API#193
pavanputhra merged 1 commit into
mainfrom
pavankumar/con-618-add-enqueue-side-vcon-counter-so-the-chain-stall-alert-can

Conversation

@pavanputhra

Copy link
Copy Markdown
Contributor

What

Adds a conserver.api.count_vcons_enqueued counter, incremented at every API site that pushes work onto an ingress list, labeled with ingress_list and source:

Endpoint source increment
POST /vcon (with ingress_lists) new 1 per list
POST /vcon/external-ingress external 1
POST /vcon/ingress (bulk) reingress number of valid UUIDs
POST /dlq/reprocess dlq_reprocess items moved

Why

The existing pipeline counters (conserver.main_loop.count_vcons_received / count_vcons_processed) are all emitted by the worker loop, so they stop together when workers hang — making it impossible for alerting to distinguish "work is arriving but nothing is completing" (a stall) from "nothing is arriving" (idle). This counter is emitted from the API process, so arrivals keep being counted even when workers are stuck.

Tests

Counter coverage for all four endpoints (fires with the right name/value/attributes; skips when nothing is enqueued). Full suite: 653 passed, 16 skipped in the conserver container.

🤖 Generated with Claude Code

Add a conserver.api.count_vcons_enqueued counter, incremented at every
API site that pushes work onto an ingress list (vCon create, external
ingress, bulk re-ingress, DLQ reprocess), labeled with ingress_list and
source. Emitted from the API process rather than the worker loop, so
arrivals keep being counted even when workers hang — this enables a
stall alert that can distinguish "arriving but not completing" from
"idle".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pavanputhra pavanputhra merged commit fb2bbda into main Jun 11, 2026
1 check passed
@pavanputhra pavanputhra deleted the pavankumar/con-618-add-enqueue-side-vcon-counter-so-the-chain-stall-alert-can branch June 11, 2026 10:42
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