metric: rework the interface of ManualWindowedHistogram
#98622
Labels
A-observability-inf
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-observability
Is your feature request related to a problem? Please describe.
The manual histogram currently maintains a cumulative and a windowed histogram. It requires both to be passed in its
Update
function. This is a little cumbersome of an interface to use as the user is expected to maintain both, a cumulative view as well as a windowed view of the metric.Describe the solution you'd like
Ideally, the
Update
function only takes a new windowed histogram and maintains the cumulative values internally. Something like how the batch histogram in Prometheus does it. https://github.com/prometheus/client_golang/blob/3d2cf0b338e19b0eaf277496058fc77bd3add440/prometheus/go_collector_latest.go#L502Related issues: #98266 and #98621.
Jira issue: CRDB-25370
Epic CRDB-20790
The text was updated successfully, but these errors were encountered: