Skip to content

[Task] Custom Prometheus collector and /metrics endpoint #917

@arasHi87

Description

@arasHi87

Description

Emit cumulative billing counters from GlobalState via a custom prometheus.Collector (not CounterVec, which resets on restart → negative rate()), served on /metrics.

Acceptance Criteria

A detailed list of conditions that must be met for the story to be accepted. These statements must focus on functional behavior and constraints rather than specific code-level implementation.

  • Custom Collector holds RLock across the GlobalState walk
  • cubecos_bytes_total/_packets_total {tenant_id,zone,direction}
  • Zero-alloc Collect (bench-gated)

Story Points: 3

Points Effort / Resources Description
1 Low Low complexity; can be resolved easily.
3 Medium Moderate workload; requires some focus, but risks are well-managed.
5 High High complexity; difficult to implement, requiring significant time and effort.
8 Very High Extreme complexity or high uncertainty. If possible, this should be divided into multiple user stories.

Notes

Delivered in PR #8. Sprint 2 (2026-05-15).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions