Hello, I want to show a graph similar to the trace...
# support
r
Hello, 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?
a
@Vishal Sharma 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 Lopez C if he thinks there are a few other graphql charts that he would like to monitor
v
@Romario Lopez C Here’s a sample query for aggregating over avg
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.
Copy code
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
Also we can connect over a call to help you in creating more charts for graphQL.
r
Thank you! How can I use the variable from the time select? Use this in my query:
v
r
thanks!