Draft: Discussion: How do we present queries to Tamland?
This is not meant to get merged, but a discussion starter.
Coming from here: !6191 (comment 1524425358)
Problem to solve: We'd like to get the actual query used for getting historical data into the Tamland manifest. The current manifest just has the entire saturation point, but this is not totally what Tamland needs.
This sketch solves this by slicing out relevant parts of the saturation point (relevant for Tamland). It includes a query
attribute that Tamland can directly use to get historical data. This uses the gitlab_component_saturation
metric (the recording rule). Tamland doesn't care about whether it uses the recording rule or the underlying query, so I figure we go with the easier one.
In Tamland itself, we'd treat the query given as a jinja template to inject relevant context like the service name.
Would that work? Is there a better way to do this?