Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metric: rework the interface of ManualWindowedHistogram #98622

Open
aadityasondhi opened this issue Mar 14, 2023 · 0 comments
Open

metric: rework the interface of ManualWindowedHistogram #98622

aadityasondhi opened this issue Mar 14, 2023 · 0 comments
Labels
A-observability-inf C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-observability

Comments

@aadityasondhi
Copy link
Collaborator

aadityasondhi commented Mar 14, 2023

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#L502

Related issues: #98266 and #98621.

Jira issue: CRDB-25370

Epic CRDB-20790

@aadityasondhi aadityasondhi added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-observability-inf A-observability-inf labels Mar 14, 2023
@aadityasondhi aadityasondhi self-assigned this Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-observability-inf C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-observability
Projects
None yet
Development

No branches or pull requests

1 participant