instana / instana-grafana-datasource

🔭 Grafana datasource plugin for Instana
https://grafana.com/plugins/instana-datasource
Apache License 2.0
38 stars 20 forks source link

Only show datapoints relevant for the selected timeframe #90

Closed Dalje-et closed 3 years ago

Dalje-et commented 3 years ago

When we cache requests, we later on append new data to them without filtering out data which is not within the selected time frame. That is usually not an issue since overflowing datapoints get cropped out automatically. However, some visualization panels do not do that (e.g., singlestat). Additionally, it is always possible to select "Query inspector" > "Data" tab and see ALL datapoints. That is quite misleading when a user first selects a time frame of let's say one hour and afterwards only five minutes. The data will be fetched from our cached and while we do not visually show all of it, the "Data" tab within the query inspector will still show all datapoints of the last one hour.

What does this PR do? Before displaying data, remove all datapoints that correspond to a timestamp before timeFilter.from in order to avoid showing too many datapoints in the "Data" panel.

schmidtl commented 3 years ago

testing scenario: turn around described issue with 1.) now-60m to now 2.) now-60m to now-30m 3.) now-60m to now the third result get's stripped, also. we can also try 2.) now-60m to now (with timeshift 30m)