https://signoz.io logo
#support
Title
# support
a

Allan Li

10/13/2022, 3:26 PM
Hello, is there a way to visualize and query traces by ranking them based on their GraphQL name?
s

Srikanth Chekuri

10/13/2022, 3:51 PM
Can you elaborate what do you mean by ranking based on the name?
a

Allan Li

10/13/2022, 3:58 PM
More specifically, I mean the tag
graphql.operation.name
Is there any way to generate visual insight by querying traces with certain names? For example a use case could be a dashboard that displays which
graphql.operation.name
is responsible for the highest latency sum.
Right now I see that we can query by
graphql.operation.name
on the filter bar of the traces UI, but can we somehow group traces by this tag and then rank it? Perhaps we have to create custom metrics or something, what would you suggest?
Thanks so much
s

Srikanth Chekuri

10/13/2022, 4:09 PM
You could do that in the dashboards panel. For example say you want to query look at the list of graphql operations with some latency greater than X for last thirty minutes. The query would look like the following.
Copy code
select toDateTime(toStartOfMinute(timestamp)) AS minute, tagMap['graphql.operation.name'] as op_name, sum(durationNano) as value from signoz_traces.signoz_index_v2 where timestamp > toDateTime64(now() - INTERVAL 30 MINUTE, 0, 'UTC') group by op_name order by value desc;
Dashboards > Some dashboard > Create panel > ClickHouse Query
You can look at the schema for traces table and can write any queries you wish. The only mandatory requirement is that there should be column with datetime type, value column with float type and optional columns with string attribute type if there is some grouping
a

Allan Li

10/13/2022, 5:09 PM
Thank you both for your help! I will take some time to digest this information.
@Srikanth Chekuri Where would I find the schema for traces table? Sorry I am very new to this.
Oh wait I think I found it on github 👍
s

Srikanth Chekuri

10/13/2022, 5:38 PM
It might be confusing on the GitHub because there are revisions. You can exec into clickhouse container and run
SHOW CREATE TABLE signoz_traces.signoz_index_v2
a

Allan Li

10/17/2022, 3:34 PM
@Srikanth Chekuri hi, I created a clickhouse query that returns a list of graphql operation names, how would I display it? The dashboard panel only seems to have two operations (timeseries and value), how would I display a list of query results? Thanks
s

Srikanth Chekuri

10/17/2022, 3:46 PM
Those are the only two types of panels supported at the moment. CC @Pranay
a

Allan Li

10/17/2022, 3:57 PM
ok I see, would your team consider adding a sandbox query that will display raw sql results on the dashboard?
s

Srikanth Chekuri

10/17/2022, 6:44 PM
Please raise a feature request here so we have something to track https://github.com/sigNoz/signoz
2 Views