Issues with Table Panel Setup in Signoz

TLDR Sumanth brings up issues with table panel setup in Signoz: missing columns, unexpected 'count' column, and an issue with dashboard view. Srikanth provides suggestions and asks Sumanth to create an issue on GitHub for further assistance.

Photo of Sumanth
Sumanth
Tue, 12 Sep 2023 07:42:48 UTC

Hi need some urgent help with Table panel in signoz, first time setting up table panel I am creating table with clickhouse query, following is the query ```SELECT traceID AS trace_id, startTime1 AS start_time ,startTime2 AS end_time, if(startTime1 != 0, if(startTime2 != 0, (toUnixTimestamp64Nano(startTime2) - toUnixTimestamp64Nano(startTime1)) / (1000000*1000), nan), nan) AS time_diff FROM ( SELECT toStartOfInterval(timestamp, toIntervalMinute(1)) AS interval, traceID, anyIf(timestamp, if(name = '/consume/{data_source}/{client}', if((stringTagMap['http.target']) = {{.datasource_pair}}, true, false), false)) AS startTime1, anyIf(timestamp, if(name = 'PUT', true, if(name='POST', true, false))) AS startTime2 FROM signoz_traces.distributed_signoz_index_v2 WHERE (timestamp BETWEEN {{.start_datetime}} AND {{.end_datetime}}) AND (serviceName IN ('Prod-ingestion-wh-consumer', 'Prod-PostNlpNotifier')) AND (numberTagMap['http.status_code'] BETWEEN 200 AND 299) GROUP BY (interval, traceID) ORDER BY (interval, traceID) ASC ) HAVING startTime1 != 0 AND startTime2 != 0 AND startTime1 < startTime2;``` But the table that is created doesnt show columns for start_time and end_time. I tested it out on clickhouse bash shell and it works well there. Why are the columns missing in table view? Why is there a column `count` that is shown even tho i dont want it?

Photo of Sumanth
Sumanth
Tue, 12 Sep 2023 07:46:13 UTC

example of the SQL command used in clickhouse bash shell which was successful ```SELECT traceID, startTime1 AS start_time, startTime2 AS end_time, if(startTime1 != 0, if(startTime2 != 0, (toUnixTimestamp64Nano(startTime2) - toUnixTimestamp64Nano(startTime1)) / (1000000 * 1000), nan), nan) AS time_diff FROM ( SELECT toStartOfInterval(timestamp, toIntervalMinute(1)) AS interval, traceID, anyIf(timestamp, if(name = '/consume/{data_source}/{client}', if((stringTagMap['http.target']) = '/consume/dixa/makesyoulocal', true, false), false)) AS startTime1, anyIf(timestamp, if(name = 'PUT', true, if(name = 'POST', true, false))) AS startTime2 FROM signoz_traces.distributed_signoz_index_v2 WHERE (serviceName IN ('Prod-ingestion-wh-consumer', 'Prod-PostNlpNotifier')) AND (((numberTagMap['http.status_code']) >= 200) AND ((numberTagMap['http.status_code']) <= 299)) GROUP BY (interval, traceID) ORDER BY (interval, traceID) ASC ) HAVING (startTime1 != 0) AND (startTime2 != 0) AND (startTime1 < startTime2) LIMIT 100```

Photo of Srikanth
Srikanth
Wed, 13 Sep 2023 06:01:53 UTC

> Why are the columns missing in table view? Format `start_time` and `end_time` to be string rather than datetime because it collides with the timestamp of the point. > Why is there a column `count` that is shown even tho i dont want it? Table view is one kind of view the aggregation data, You don’t have any aggregation which is why count with 0 is show default. What you want is list view.

Photo of Sumanth
Sumanth
Wed, 13 Sep 2023 06:18:28 UTC

Srikanth on add panel i only see add Table. Where can i find list view option? atleast removal of the count field would from the table view would be good enough

Photo of Sumanth
Sumanth
Wed, 13 Sep 2023 06:25:46 UTC

I am no longer seeing the count column. Last question Srikanth I am noticing that the tble view isnt loading on the panel in the dashboard level view but when i click on the panel and hit view, i am able to see the populated table Why is this so? Any fix?

Photo of Srikanth
Srikanth
Wed, 13 Sep 2023 06:48:44 UTC

You seem to using some variable, does the data exist for it?

Photo of Sumanth
Sumanth
Wed, 13 Sep 2023 06:53:44 UTC

yes

Photo of Sumanth
Sumanth
Wed, 13 Sep 2023 06:53:57 UTC

when i click on view as you can see i am able to see the table of data

Photo of Srikanth
Srikanth
Wed, 13 Sep 2023 07:38:55 UTC

Not sure what’s the issue, let me check if I can reproduce this and if it is an issue.

Photo of Srikanth
Srikanth
Wed, 13 Sep 2023 10:31:00 UTC

Can you check if the API call is returning data?

Photo of Sumanth
Sumanth
Thu, 14 Sep 2023 10:15:10 UTC

This is the api response for the dashboard fetching at the dashboard level view: ```{ "status": "success", "data": { "id": 12, "uuid": "b725787a-4e57-46df-9125-f0825dca4ce0", "created_at": "2023-09-12T09:05:16.046836768Z", "updated_at": "2023-09-13T07:38:02.48623877Z", "data": { "description": "", "layout": [ { "h": 2, "i": "82e202ef-b93d-4aea-9bdf-5d0623594dd6", "w": 6, "x": 0, "y": 0 } ], "tags": [], "title": "Tabular Views", "variables": { "datasource_pair": { "allSelected": false, "customValue": "sdf,/consume/zendesk/velocityglobal,/consume/freshdesk/joinnextmed,/consume/zendesk/skillz,/consume/zendesk/jamesvillas,/consume/zendesk/nutrafol,/consume/zendesk/wallapop,/consume/dixa/otrium,/consume/dixa/makesyoulocal,/consume/zendesk/blackcircles,/consume/dixa/trendsales ", "description": "", "modificationUUID": "1a69fb9b-961d-411b-8039-f46beff257cc", "multiSelect": false, "name": "datasource_pair", "queryValue": "", "selectedValue": "/consume/dixa/trendsales", "showALLOption": false, "sort": "DISABLED", "textboxValue": "", "type": "CUSTOM" } }, "widgets": [ { "description": "Tabular realtime (upto 1 minute) view of webhook api requests with their trace and their latency", "id": "82e202ef-b93d-4aea-9bdf-5d0623594dd6", "isStacked": false, "nullZeroValues": "zero", "opacity": "1", "panelTypes": "table", "query": { "builder": { "queryData": [ { "aggregateAttribute": { "dataType": null, "id": "------", "isColumn": null, "key": "", "type": null }, "aggregateOperator": "count", "dataSource": "metrics", "disabled": false, "expression": "A", "filters": { "items": [], "op": "AND" }, "groupBy": [], "having": [], "legend": "", "limit": null, "orderBy": [], "queryName": "A", "reduceTo": "sum", "stepInterval": 60 } ], "queryFormulas": [] }, "clickhouse_sql": [ { "disabled": false, "legend": "", "name": "A", "query": "SELECT\n traceID AS trace_id, \n CAST(startTime1 AS VARCHAR) AS start_time,\n CAST(startTime2 AS VARCHAR) AS end_time,\n if(startTime1 != 0, if(startTime2 != 0, (toUnixTimestamp64Nano(startTime2) - toUnixTimestamp64Nano(startTime1)) / (1000000*1000), nan), nan) AS time_diff\nFROM\n(\n SELECT\n toStartOfInterval(timestamp, toIntervalMinute(1)) AS interval,\n traceID,\n anyIf(timestamp, if(name = '/consume/{data_source}/{client}', if((stringTagMap['http.target']) = {{.datasource_pair}}, true, false), false)) AS startTime1,\n anyIf(timestamp, if(name = 'PUT', true, if(name='POST', true, false))) AS startTime2\n FROM signoz_traces.distributed_signoz_index_v2\n WHERE (timestamp BETWEEN {{.start_datetime}} AND {{.end_datetime}}) AND (serviceName IN ('Prod-ingestion-wh-consumer', 'Prod-PostNlpNotifier'))\n AND (numberTagMap['http.status_code'] BETWEEN 200 AND 299)\n GROUP BY (interval, traceID)\n ORDER BY (interval, traceID) ASC\n)\nHAVING startTime1 != 0 AND startTime2 != 0 AND startTime1 \u003c startTime2\nORDER BY time_diff DESC;" } ], "id": "251dbc33-e700-424c-8567-658c52f2d4e8", "promql": [ { "disabled": false, "legend": "", "name": "A", "query": "" } ], "queryType": "clickhouse_sql" }, "timePreferance": "GLOBAL_TIME", "title": "Real time api requests latency", "yAxisUnit": "none" } ] } } }```

Photo of Sumanth
Sumanth
Thu, 14 Sep 2023 10:16:52 UTC

This is the response for query_range request : ```{ "status": "success", "data": { "resultType": "", "result": [ { "queryName": "A", "series": [ { "labels": { "end_time": "2023-09-14 09:43:37.788686133", "start_time": "2023-09-14 09:43:10.908335454", "time_diff": "26.880350679", "trace_id": "764956ef07704b7bfb9923f3156150f7" }, "labelsArray": [ { "trace_id": "764956ef07704b7bfb9923f3156150f7" }, { "start_time": "2023-09-14 09:43:10.908335454" }, { "end_time": "2023-09-14 09:43:37.788686133" }, { "time_diff": "26.880350679" } ], "values": [] }, { "labels": { "end_time": "2023-09-14 09:48:48.820905783", "start_time": "2023-09-14 09:48:36.538794322", "time_diff": "12.282111461", "trace_id": "3e38f30dc3d81ae3c834aa9a2fbb1aff" }, "labelsArray": [ { "trace_id": "3e38f30dc3d81ae3c834aa9a2fbb1aff" }, { "start_time": "2023-09-14 09:48:36.538794322" }, { "end_time": "2023-09-14 09:48:48.820905783" }, { "time_diff": "12.282111461" } ], "values": [] }, { "labels": { "end_time": "2023-09-14 10:08:21.132944735", "start_time": "2023-09-14 10:08:11.646482864", "time_diff": "9.486461871", "trace_id": "b787814d98fdeb2e9eb8b3ed569f5306" }, "labelsArray": [ { "trace_id": "b787814d98fdeb2e9eb8b3ed569f5306" }, { "start_time": "2023-09-14 10:08:11.646482864" }, { "end_time": "2023-09-14 10:08:21.132944735" }, { "time_diff": "9.486461871" } ], "values": [] }, { "labels": { "end_time": "2023-09-14 09:51:12.761755540", "start_time": "2023-09-14 09:51:07.108697120", "time_diff": "5.65305842", "trace_id": "218ec1ab8196319dc1e492078d8502f8" }, "labelsArray": [ { "trace_id": "218ec1ab8196319dc1e492078d8502f8" }, { "start_time": "2023-09-14 09:51:07.108697120" }, { "end_time": "2023-09-14 09:51:12.761755540" }, { "time_diff": "5.65305842" } ], "values": [] }, { "labels": { "end_time": "2023-09-14 09:43:34.383588003", "start_time": "2023-09-14 09:43:30.297924736", "time_diff": "4.085663267", "trace_id": "877e2006b7816b3ad7d2ab67b467901f" }, "labelsArray": [ { "trace_id": "877e2006b7816b3ad7d2ab67b467901f" }, { "start_time": "2023-09-14 09:43:30.297924736" }, { "end_time": "2023-09-14 09:43:34.383588003" }, { "time_diff": "4.085663267" } ], "values": [] }, { "labels": { "end_time": "2023-09-14 10:02:07.245698810", "start_time": "2023-09-14 10:02:04.228436853", "time_diff": "3.017261957", "trace_id": "858180761b27af73699d6ca525c70372" }, "labelsArray": [ { "trace_id": "858180761b27af73699d6ca525c70372" }, { "start_time": "2023-09-14 10:02:04.228436853" }, { "end_time": "2023-09-14 10:02:07.245698810" }, { "time_diff": "3.017261957" } ], "values": [] }, ........```

Photo of Sumanth
Sumanth
Thu, 14 Sep 2023 10:18:05 UTC

This is the response for query_range when i click view on the panel ```{ "status": "success", "data": { "resultType": "", "result": [ { "queryName": "A", "series": [ { "labels": { "end_time": "2023-09-14 09:43:37.788686133", "start_time": "2023-09-14 09:43:10.908335454", "time_diff": "26.880350679", "trace_id": "764956ef07704b7bfb9923f3156150f7" }, "labelsArray": [ { "trace_id": "764956ef07704b7bfb9923f3156150f7" }, { "start_time": "2023-09-14 09:43:10.908335454" }, { "end_time": "2023-09-14 09:43:37.788686133" }, { "time_diff": "26.880350679" } ], "values": [] }, { "labels": { "end_time": "2023-09-14 09:48:48.820905783", "start_time": "2023-09-14 09:48:36.538794322", "time_diff": "12.282111461", "trace_id": "3e38f30dc3d81ae3c834aa9a2fbb1aff" }, "labelsArray": [ { "trace_id": "3e38f30dc3d81ae3c834aa9a2fbb1aff" }, { "start_time": "2023-09-14 09:48:36.538794322" }, { "end_time": "2023-09-14 09:48:48.820905783" }, { "time_diff": "12.282111461" } ], "values": [] }, { "labels": { "end_time": "2023-09-14 10:08:21.132944735", "start_time": "2023-09-14 10:08:11.646482864", "time_diff": "9.486461871", "trace_id": "b787814d98fdeb2e9eb8b3ed569f5306" }, "labelsArray": [ { "trace_id": "b787814d98fdeb2e9eb8b3ed569f5306" }, { "start_time": "2023-09-14 10:08:11.646482864" }, { "end_time": "2023-09-14 10:08:21.132944735" }, { "time_diff": "9.486461871" } ], "values": [] }, { "labels": { "end_time": "2023-09-14 09:51:12.761755540", "start_time": "2023-09-14 09:51:07.108697120", "time_diff": "5.65305842", "trace_id": "218ec1ab8196319dc1e492078d8502f8" }, "labelsArray": [ { "trace_id": "218ec1ab8196319dc1e492078d8502f8" }, { "start_time": "2023-09-14 09:51:07.108697120" }, { "end_time": "2023-09-14 09:51:12.761755540" }, { "time_diff": "5.65305842" } ], "values": [] }, ....... }```

Photo of Sumanth
Sumanth
Thu, 14 Sep 2023 10:18:14 UTC

does that help?

Photo of Srikanth
Srikanth
Thu, 14 Sep 2023 13:24:55 UTC

This should work. Can you create an issue here ?

Photo of Sumanth
Sumanth
Thu, 14 Sep 2023 14:41:27 UTC

will do tomorrow first thing