11 Nov 2024 03:51 PM - last edited on 12 Nov 2024 02:04 PM by MaciejNeumann
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!
11 Nov 2024 04:25 PM
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.
13 Nov 2024 08:03 AM
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
28 Nov 2024 06:30 PM
I ended up using log monitoring to generate metrics that I could then graph nicely. Thanks!