Due to Histogram's interesting calling conventions in JS, we always have a backing
Histogram instance for any given
Accumulate() call. If the histogram is expired, that instance is
gExpiredKeyedHistogram, depending if you need a
internal_HistogramAdd is called whether the histogram is expired or not. If it's expired, the samples get dumped on
gExpiredHistogram and go nowhere.
Unless we're in GV Streaming mode. In that case, just before we dump the sample on
gExpiredHistogram we redirect it to
Instead we should ensure that the histogram we intend to stream isn't expired.
This might just be a check for
if (histogram == gExpiredHistogram), but we need to double-check that expired keyed histograms also send
internal_HistogramAdd. (For now, since GV Streaming doesn't support keyed metrics, we could ensure that the histogram isn't keyed and isn't
gExpiredHistogram and that'd cover it)