Currently tags are just key value pairs. When dealing with more complex data, this can become more difficult to manage.
For instance, in the integration with OpenShift we store many different tags, some of which have multiple values. These are stored under one tag, where we store the value as a string containing a comma separated list
For instance, a pod can have multiple labels:
Eg "label" = "foo:bar,baz:bot,hello:world"
Performing queries based on labels is a very common in OpenShift/Kubernetes, its how grouping of components is done.
We can currently handle querying of labels using regex, but this gets complex and prone to error. There are also questions of performance when having to run complex regexp overs larger metric sets. It would be nice if we could handle these types of queries in a more elegant manner.
Example of common queries we would like to do:
- if label foo = bar
- if value 'ba' is in label 'foo'
- if value 'ba' is not in label 'foo'
- if label 'foo' exists
- if label 'foo' does not exist
Note: it is also common to perform multiple queries. Eg find metrics where the label foo equals bar, and the label baz contains 'ba' but the metric does not contain the label bort.
Treat tags as json format instead of key:value pairs. This would allow us to perform queries using dot notation. eg label.foo.bar=bat
I am not sure if it would be feasible to store this in Cassandra like this, but even if we could make the queries act like it was would really help out people using the API directly.