Transformations time series to table show json frame

  • What Grafana version and what operating system are you using?

  • Grafana v12.0.0 (4c0e7045f9)

  • What are you trying to achieve?

  • Display HTTP client availability metrics in a table view.

  • How are you trying to achieve it?

  • Using a Prometheus query availability like this:

  • sum(rate(traces_span_metrics_duration_seconds_count{service_name=“service-message-platform”, component=“httpclient”, status_code=~“OK|STATUS_CODE_UNSET”}[1m])) by (server_address, server_port, span_name) / sum(rate(traces_span_metrics_duration_seconds_count{service_name=“service-message-platform”, component=“httpclient”}[1m])) by (server_address, server_port, span_name)

  • What happened?

  • one of those metrics empty will make table show json frame

  • sum(rate(traces_span_metrics_duration_seconds_count{service_name=“service-message-platform”, component=“httpclient”, status_code=~“OK|STATUS_CODE_UNSET”}[1m]))

  • What did you expect to happen?

  • show availability = 0% if empty status_code=~“OK|STATUS_CODE_UNSET” metrics

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

Hi, setting Cell type → Sparkline in overrides for this column should help. (I guess type Autodoesn’t recognise it as sparkline when some cells don’t have the data).

1 Like

It works, many thanks.

1 Like