Hi,
I’m trying to migrate a State timeline panel from v8.3.2 to v10.0.1 with BigQuery as the data source, and I’m having trouble achieving the same results as I had in v8.3.2. My actual query is quite complex, but produces a simple table. Here is a test query that emulates my query output for illustration:
WITH test_data AS
(
SELECT TIMESTAMP("2023-07-13 00:00:00 UTC") AS time, "foo" AS metric, 0 AS state UNION ALL
SELECT TIMESTAMP("2023-07-13 00:00:00 UTC") AS time, "bar" AS metric, 1 AS state UNION ALL
SELECT TIMESTAMP("2023-07-13 01:00:00 UTC") AS time, "foo" AS metric, 1 AS state UNION ALL
SELECT TIMESTAMP("2023-07-13 02:00:00 UTC") AS time, "bar" AS metric, 0 AS state UNION ALL
SELECT TIMESTAMP("2023-07-13 03:00:00 UTC") AS time, "foo" AS metric, 0 AS state
)
SELECT * FROM test_data
Here is a screenshot from v8.3.2 where the state timeline panel does what I want:
Without any modifications, the same query and panel setup produces an incorrect timeline on v10.0.1:
I enabled “table view” on both versions to debug this and saw that the older version seems to produce multi-frame timelines. I added the “prepare time series” transformation which almost solves my problem:
Now the remaining problem is that the swim lane labels are on the format state {metric="bar",name="A"}
instead of just bar
.
Here is the table view from v8.3.2:
And here is the table view from v10.0.1:
How can I label each lane with the metric name (foo/bar in this case)? I had a hard time finding threads discussing the same problem, which makes me think I’ve gone down the wrong path somewhere. I’m not sure whether my query output is even suitable for consumption by the state timeline plugin, and I’m not sure how to verify this.