You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add native histogram reporting to the reporter interfaces (#278)
Tally's timers and histograms are pre-bucketed, so percentiles cannot be
merged across sources. Native histograms derive their buckets from the
data and merge cleanly, but every value-carrying method in tally today is
a fixed-width number; a native histogram travels as a marshalled blob.
Nothing existing can carry one, so the reporter interfaces have to break.
This adds:
StatsReporter.ReportNativeHistogram(name, tags, payload, samples)
CachedStatsReporter.AllocateNativeHistogram(name, tags, maxBuckets)
CachedNativeHistogram.ReportNativeHistogram(payload, samples)
There is deliberately no per-bucket equivalent of CachedHistogramBucket.
A native histogram rescales its buckets as it observes values, so there
is no stable set of bounds to pre-allocate handles against; the whole
distribution is reported as one payload.
Every in-repo implementer is updated so the tree compiles. Most of them
are no-ops, because their wire formats cannot carry an opaque payload:
statsd carries scalar values only.
prometheus has native histograms of its own, but tally hands the
reporter an already-serialized payload in whatever encoding
the application chose, and a blob cannot become a
prometheus.Collector.
m3 speaks thrift over UDP with no payload field. This one is
not a plain no-op: it counts drops into
tally.internal.num-native-histograms-dropped, reported only
when non-zero so that fleets which never use native
histograms do not gain a permanently-zero series.
This commit lands before the NativeHistogram type it carries, so that the
type and the Scope surface can each be reviewed against an interface that
already exists.
0 commit comments