Closed ankitnayan closed 1 year ago
I have added the details for this panel type. Please let me know if there are questions or concerns.
@palashgdev, please check the expected behaviour from the frontend and ask if there are questions around it.
@srikanthccv can we have same the response that client would be rendering ?
Examples of column names:
This is done
Add a table view as new type apart from existing timeseries and value type views for charts.
The table view is very similar to the timeseries type, except that the result is rendered in a table instead of a line graph. The major difference is that the aggregation is performed for the whole duration, i.e.,
stepInterval
is the same as the total duration the user selects. The rest of the sub-components in the query builder remain the same. The "Aggregation every" initially will be (end-start) in seconds.frontend
Following is the sample UI. Here the aggregate operator is
AVG
and the aggregate attribute issystem.cpu.user
with groupBy ashost
andcluster
Sample response from the backend will be.
```json { "status": "success", "data": { "resultType": "table", "result": [ { "queryName": "A", "series": [ { "labels": {"host": "pranay-vm-1", "cluster": "signoz-cluster-1"}, "values": [ { "timestamp": 1686194430000, "value": "11.6" } ] }, { "labels": {"host": "pranay-vm-2", "cluster": "signoz-cluster-1"}, "values": [ { "timestamp": 1686194430000, "value": "10.6" } ] }, { "labels": {"host": "aws-node-2", "cluster": "signoz-cluster-3"}, "values": [ { "timestamp": 1686194430000, "value": "4.6" } ] }, { "labels": {"host": "aws-node-1", "cluster": "signoz-cluster-3"}, "values": [ { "timestamp": 1686194430000, "value": "1.6" } ] } ], "list": null } ] } } ```Multiple queries
It is certainly possible that there will be more than one query. Each aggregation gets its own column. The most basic example could be the
Key Operations
from the Service Overview page.In the above screenshot, every aggregation column corresponds to a query in the builder, with each having groupBy
name
.Different groupBy
Since each query is independent of other queries, there can be a scenario where groupBy is different. The number of columns will be a unique set of groupBy keys in the result, along with a column for each aggregation. Whenever something is unknonn, the cell will show n/a. For example, there is no P99 for the host-cluster, so we show n/a. Take the above two scenarios; the user wants to see the host metrics and latencies table. The result table will be of the following.
The above example is entirely mutually exclusive. It is very common but possible. The middle ground is there will be overlapping groupBy.