Skip to content

stats: New type(s) of Metric #5790

@fredlas

Description

@fredlas

Gauges are currently being repurposed for not-particularly-gaugey things, like hashes and booleans.

In #4974 I proposed separating these out into a new, more intentionally opaque, stats type. In #5770, @mattklein123 further proposed another type for text strings. This issue will be for 1) discussion of whether to do this and 2) tracking the work if so.

The current stats, which have some significant optimizations applied to their implementations, are all int64s. Does anyone who is familiar with the stats implementation immediately see any likely issues with introducing stats that aren't int64s? Would these strings have to have a maximum, or even fixed length?

Also, let's start the discussion of what to call them. I think it would be fun and useful to keep the physical control panel metaphor of "gauge" going, so I suggest Readout for the text one. For the opaque one, though, I think by its nature can't have a particularly good name, so I suggest just Opaque.

@ggreenway @jmarantz @mattklein123 @ramaraochavali

(Also: I am considering trying to remove set() from Gauge, or at least making it test-only. However, I haven't yet inspected all of the Gauge::set() users closely enough to know for sure if it would be reasonable.)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions