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

Romario Lopez C

04/21/2023, 8:02 PM
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

Ankit Nayan

04/22/2023, 6:25 AM
@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

Vishal Sharma

04/24/2023, 1:11 PM
@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

Romario Lopez C

04/24/2023, 5:20 PM
Thank you! How can I use the variable from the time select? Use this in my query:
v

Vishal Sharma

04/24/2023, 8:00 PM
r

Romario Lopez C

04/24/2023, 8:16 PM
thanks!
3 Views