Skip to content

goodhistogram: make snapshots serializable - #16

Open
angles-n-daemons wants to merge 1 commit into
mainfrom
bdillmann/serialize-snapshot
Open

goodhistogram: make snapshots serializable#16
angles-n-daemons wants to merge 1 commit into
mainfrom
bdillmann/serialize-snapshot

Conversation

@angles-n-daemons

Copy link
Copy Markdown
Contributor

Snapshot currently stores its bucket configuration behind an unexported pointer. Encoders preserve the counts and totals but cannot restore the layout needed for quantiles and Prometheus export.

Store the schema and tracked range directly on Snapshot and reconstruct the cached derived configuration when it is consumed. This makes snapshots portable through ordinary JSON encoding without a second public wire type.

Tests: go test ./...

Snapshot currently stores its bucket configuration behind an unexported pointer. Encoders preserve the counts and totals but cannot restore the layout needed for quantiles and Prometheus export.

Store the schema and tracked range directly on Snapshot and reconstruct the cached derived configuration when it is consumed. This makes snapshots portable through ordinary JSON encoding without a second public wire type.
@angles-n-daemons angles-n-daemons self-assigned this Sep 11, 2026
@angles-n-daemons
angles-n-daemons marked this pull request as ready for review September 11, 2026 17:18
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