Docs (https://grafana.com/docs/grafana/latest/administration/recorded-queries/#how-recorded-queries-work):
Recorded queries only work with backend data source plugins. Refer to Backend data source plugin for more information about backend data source plugins. You can recorded four types of queries:
- single row and column - A query that returns a single row and column.
- row count - A query that returns meaningful rows to be counted.
- expression - Any expression. To learn more about creating and using expressions, see Write expression queries.
- dataplane numeric - A query that returns dataplane numeric kind data.
Generally, the two ways that allow multi-dimension metrics to be recorded are (3rd and 4th item above):
- Use a data source that is directly sending data back in the dataplane numeric format (including version) see dataplane docs and example json Frames. The datasources delcare that they are sending data plane by specify the data type and version in the response.
- SSE (Server-Side-Expressions) will guess various time series formats and numeric format when the input data in not in data plane. If you add a reduce SSE operation on data that it can guess, you can record that reduce statement as multiple dimensions with recorded queries.
Using SSE method, the numeric format that SSE can guess is a table format with a single numeric column, and one or more string columns (basically what looks like numeric-long in the examples above).