Creating GraphQL Query Traces Graph
TLDR Romario requested help with a graph for GraphQL queries. vishal-signoz provided a sample query and additional resources, while Ankit suggested potential improvements to the documentation and integrations.
Powered by Struct AI

7
5mo
Solved
Apr 21, 2023 (5 months ago)
Romario
Romario
08:02 PMHello, I want to show a graph similar to the traces tab for my graphql queries. I followed the example but it shows me this. Someone have an idea how to achieve this?
Apr 22, 2023 (5 months ago)
Ankit
Ankit
06:25 AM vishal-signoz can you help here? Also 2 takeaways:
1. Add the gap in docs https://signoz.io/docs/tutorial/writing-clickhouse-queries-in-dashboard/
2. If graphql has a few other charts too that are relevant, should we enable out of box as an integration? Please get in touch with Romario if he thinks there are a few other graphql charts that he would like to monitor
1. Add the gap in docs https://signoz.io/docs/tutorial/writing-clickhouse-queries-in-dashboard/
2. If graphql has a few other charts too that are relevant, should we enable out of box as an integration? Please get in touch with Romario if he thinks there are a few other graphql charts that he would like to monitor
Apr 24, 2023 (5 months ago)
vishal-signoz
vishal-signoz
01:11 PM Romario Here’s a sample query for aggregating over avg
You can replace
Also remember to use legend and y axis units as shared in screenshot.
duration
grouped by http.method
You can replace
http.method
with any other attribute.Also remember to use legend and y axis units as shared in screenshot.
SELECT toStartOfInterval(timestamp, INTERVAL 60 SECOND) AS ts,
stringTagMap['http.method'] as `http.method`, avg(durationNano) as value
from signoz_traces.distributed_signoz_index_v2 where
timestamp > now() - INTERVAL 30 MINUTE
AND has(stringTagMap, 'http.method') group by http.method,ts order by http.method ASC,ts
01:13
vishal-signoz
01:13 PMAlso we can connect over a call to help you in creating more charts for graphQL.
Romario
Romario
05:20 PMThank you! How can I use the variable from the time select? Use this in my query:
vishal-signoz
vishal-signoz
08:00 PMYou can find reserved variables for timestamp here: https://signoz.io/docs/tutorial/writing-clickhouse-queries-in-dashboard/#building-alert-queries-with-clickhouse-data
Romario
Romario
08:16 PMthanks!

SigNoz Community
Built with ClickHouse as datastore, SigNoz is an open-source APM to help you find issues in your deployed applications & solve them quickly | Knowledge Base powered by Struct.AI
Indexed 825 threads (61% resolved)
Similar Threads
Creating Signoz Dashboard for GC Metrics
Div wanted to create a dashboard for GC events and metrics. Ankit and vishal-signoz provided help with Clickhouse queries and template variables.



10
4mo
Solved
Debugging and Optimizing Slow Signoz Dashboard
Div reported slow Signoz dashboard and errors. Srikanth suggested creating a materialized column and adding filters to speed up queries. vishal-signoz confirmed the suggested approach.


26
4mo
Solved
Grouping Fields in Clickhouse Query for Graph
Romario had difficulty displaying `http_status` in a graph using a clickhouse query. Srikanth suggested using `toString` to resolve the issue.
10
4mo
Solved