Hello, is there a way to visualize and query trace...
# support
a
Hello, is there a way to visualize and query traces by ranking them based on their GraphQL name?
s
Can you elaborate what do you mean by ranking based on the name?
a
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
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
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
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
@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
Those are the only two types of panels supported at the moment. CC @Pranay
a
ok I see, would your team consider adding a sandbox query that will display raw sql results on the dashboard?
s
Please raise a feature request here so we have something to track https://github.com/sigNoz/signoz