biggraphite icon indicating copy to clipboard operation
biggraphite copied to clipboard

Support 'namespaces' for metrics

Open iksaif opened this issue 7 years ago • 3 comments

It would be useful to have namespaces for metrics, in particular for multi-tenancy. This would allow us to have usage (in bytes and points/sec) per namespace.

Implentation wise, for carbon we could probably reuse some of that https://github.com/criteo-forks/carbon/blob/master/lib/carbon/storage.py

For Graphite we could add a way to filter out things that are not in the current namespace, but that isn't super important for now.

iksaif avatar Apr 10 '17 08:04 iksaif

Since most users [citation needed] already have some sort of namespacing based on the first 1~3 elements of the metric paths (e.g. app.component, team.app.component, etc.), maybe we could start by using a simple prefix tree, possibly with configurable depth?

It makes it low-cost to compute stats per node and merge them, as long as the only goal remains computing stats.

dbxfb avatar Apr 10 '17 18:04 dbxfb

With have unfertonately both team.subsystem and bla.team.subsystem. It will make it hard to group by 'team' if we just look at the first three elements. (Unless we group usage for all the combinations of the first three elements, but that may be a lot)

iksaif avatar Apr 11 '17 07:04 iksaif

We could take all the unique values of the 2~3 first path elements, and assign a type to them, and then combine stats :-)

dbxfb avatar Apr 11 '17 17:04 dbxfb