Home / Companies / Box / Blog / Post Details
Content Deep Dive

Open Sourcing ResetOnSnapshotReservoir

Blog post from Box

Post Details
Company
Box
Date Published
Author
Deepak Wadhwani
Word Count
600
Company Posts That Month
10
Language
English
Hacker News Points
-
Post removed?
No
Summary

Metrics data is crucial for observability at Box, where engineers depend on service metrics to assess performance and troubleshoot issues. The Observability Team provides instrumentation libraries that utilize Codahale Metrics, particularly focusing on histograms to measure value distributions like latencies. The existing ExponentiallyDecayingReservoir, which biases data towards recent entries, has limitations when reporting data every minute since it reflects a state from approximately five minutes prior. This issue is exacerbated when metrics stop receiving updates, potentially causing inaccurate alerts. Although solutions like the SlidingTimeWindowArrayReservoir offer improvements, they disrupt the established architecture of the metrics library. To resolve these issues, a custom ResetOnSnapshotReservoir was developed, which creates a new UniformReservoir every time a snapshot is reported, thereby ensuring data is relevant to the most recent 60-second interval. This new reservoir has been implemented as the default for all histograms and timers at Box and is available as an open-source resource.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.