Query Analytics: URLs in Query Analytics with a selected query and a timestamp range does not select the query

Description

If an URL has a selected query and uses unix timestamps as a time frame will not have the query selected.

Example:

http://pmm-server/graph/d/pmm-qan/pmm-query-analytics?var-service_name=mysql1-mysql&filter_by=CC0F42D4205D5441&from=1629948664547&to=1629991864548

 

Rendered query analytics dashboard:

 

Despite the filter_by being present, no query id is selected.

If instead of the timestamps, the ranges are relative like in this url:

http://pmm-server/graph/d/pmm-qan/pmm-query-analytics?var-service_name=mysql1-mysql&filter_by=CC0F42D4205D5441&from=now-2d&to=now

 

 

The dashboard changes and the query is selected as expected. 

 

One interesting side effect is that if you zoom in a metric on MySQL or in Node dashboard (it will put unix timestamps as reference points), go to query analytics, select a query and refresh the page, your selection will be gone.

How to test

None

How to document

None

Attachments

2
  • 27 Aug 2021, 07:18 AM
  • 27 Aug 2021, 07:16 AM

Smart Checklist

Activity

Show:

Jira Bot December 15, 2021 at 10:58 AM

To: Former user
CC:

Hi, I'm jira-bot, Percona's Jira automation tool. I've detected that someone from
Percona has made an edit to the Summary field of an issue that you reported.

I'm not sentient (yet) so I'm not sure whether the person fixed a typo, changed
a few words, or completely rewrote the text. In any case, it is Percona Engineering's
intention to make the Summary and Description of an issue as accurate as possible
so that we're fixing the actual problem you're encountering, and to avoid
misunderstandings about symptoms and causes.

If the current Summary does not accurately reflect the problem you are reporting,
or if you feel the change was otherwise inappropriate in some way, please add a
new comment explaining things and we'll address it as soon as we can.

This message will be added only once per issue, regardless of how many times
the Summary is edited.

message-code:summary-edited

Roma Novikov November 11, 2021 at 6:01 PM

I think we can't entirely solve the problem with all cases here, and the current FeatureBuild is making significant improvements in UX

As for future improvements for share link functionality, I've filed https://perconadev.atlassian.net/browse/PMM-9148#icft=PMM-9148  for us to work deeper.  

Roma Novikov November 11, 2021 at 8:33 AM

, I think the best way for me - to install the FB and play with it. I will do this today and provide some feedback

Tiago Mota November 10, 2021 at 4:41 PM

This problem was not caused by timestamps. This is logic that we always had: when the time changes we reset the selected query and go back to the first page. Removed this and now it works and intended.

Although there's is still a problem: when you reload the page and have a selected query that is not on the first table page. This will always open on the first page as we never implemented functionality to find the correct page neither on BE nor FE.
Jiri did some tests regarding this and it may have performance implications to find the right page where the query is.
For me for this to be perfect we should also open the right table page. Which would involve passing the selected query to the BE and there find the correct page based on the selected query and page size and return the right page instead of the first.

Also if you change to a time range where the query you selected is not present it shouldn't show without any information or error (but this is expected).

^ PTAL

Steve Hoffman September 13, 2021 at 7:20 PM
Edited

This has been verified as an issue...  On my test system (2.21.0) the following is broken and only filters the top section by query but fails to open the details section for the selected query:

https://zackster.hofftech.net:8443/graph/d/pmm-qan/pmm-query-analytics?filter_by=3608558461747943073&order_by=-load&from=1631553010000&to=1631560369000&dimensionSearchText=3608558461747943073&totals=false&query_selected&details_tab=details

While this query using more relative times works perfect and both filters the top panel and also allows the user to link to an open bottom panel on the details tab. 

https://zackster.hofftech.net:8443/graph/d/pmm-qan/pmm-query-analytics?filter_by=3608558461747943073&order_by=-load&from=now-5h&to=now&dimensionSearchText=3608558461747943073&totals=false&query_selected&details_tab=details

 

 

Done

Details

Assignee

Reporter

Priority

Components

Needs QA

Yes

Planned Version/s

Fix versions

Story Points

Affects versions

Smart Checklist

Created August 27, 2021 at 7:27 AM
Updated November 13, 2024 at 8:43 AM
Resolved November 18, 2021 at 10:59 AM

Flag notifications