cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DQL query optimisation for dashboards

wefsacsdf
Visitor

I'm building a dashboard to monitor the status of our services. Some of the data I want to capture requires me to fetch spans or logs, which it turns out can get quite expensive.

Some of the queries I'm making for different visualisations have a common element to them, ie they might fetch spans, then filter by the same predicates, before displaying the data in a different way, or manipulating it further. 

Is there a way to make a query only once, then store the result against a variable (or similar), then reference that variable from multiple visualisations, thus cutting down the number of actual queries made.

 

Thanks! 

3 REPLIES 3

StrangerThing
Organizer

I think this is totally doable in a variable, especially if you hide it so it only runs once upon dashboard load. You may have trouble with the format of the results, but I'm sure once you figure it out, it will work very well.

Peter_Youssef
Champion

Hello @wefsacsdf 

It's better to ensure the logs and spans configurations are properly set within the monitoring tenant under Settings > preferences > Oneagent features.

This is applied when the spans and logs are discovered automatically.

Incase you're using Opentelemetry ingestion is different.

Hoping the below docs provide the required illustration:

Regarding formulating an entity selector:

DQL:

KR,

Peter

 

 

wefsacsdf
Visitor

I ended up using log monitoring to generate metrics that I could then graph nicely. Thanks!

Featured Posts