Migrating state timeline from v8.3.2 to v10.0.1: use metric as lane label?

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.

Go into transformation tab thrn find prepare rime series then choose multi time-frame? Maybe that will work

Hi yosiasz, that’s indeed what I’ve done and how I ended up with the timeline shown 3rd from the bottom. I want to know how to sanitize the labels from

state {metric="bar",name="A"}

to

bar

Or, if that’s not possible, I’d love to get some tips on how I can modify my query to achieve my goal.

Sorry, by “migration” I really meant “recreate the same panel in the new version”. This is a brand new dashboard.

Why doesn’t bar extend all the way to the right in your picture? What does the Table view look like in your panel?

My example query is a bit contrived to show how the v10.0.1 timeline doesn’t fill in the blanks.

1 Like

Thanks for your help, but I’m not sure I understand still. Is this the expected output then?

I’m just confused because v8.3.1 produces this, which is what I actually want:

Sorry for the noise.

1 Like