-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TSVB] Change the default mode from last value to entire timerange #93608
Conversation
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
merge conflict between base and head |
src/plugins/vis_type_timeseries/server/usage_collector/get_usage_collector.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
merge conflict between base and head |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes looks good to me. I have only one question about description. For me it looks like a breaking change cause all new visualizations will use a different mode. Maybe we should somehow to highlight that by adding Release Nodes
/ Dev Docs
. @stratoula any ideas?
I agree let's add a brief Dev Docs section to notify the users about this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding the descriptions! LGTM!
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@@ -86,7 +89,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |||
const labelString = await PageObjects.visualBuilder.getGaugeLabel(); | |||
expect(labelString).to.be('Count'); | |||
const gaugeCount = await PageObjects.visualBuilder.getGaugeCount(); | |||
expect(gaugeCount).to.be('156'); | |||
expect(gaugeCount).to.be('13,830'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this needs to change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it because with that changes by default we use EntireTimeRange
instead of LastValue
. 13,830 was calculated for the whole timeperiod
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. I am fine then. We could also set the mode to Last Value and not change the test but I have no strong objection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usage collector works fine now. What doesn't is the following scenario:
I have an already existing timeseries TSVB viz. I choose to edit it, if I navigate to the metric Tab for example, I see that the mode is set to Last Value. It should default to entire timerange
Moreover I suggest to add a functional test to check if the entire timerange is selected for an new TSVB viz.
Finally, I see that we changed the value of a functional test. Why? I see above that you set the value to Last value, so this shouldn't change, right?
Fixed it.
Added functional test for it.
I have done this so that we cover both cases when we have 'Last value' and 'Entire time range'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, it works as expected now. Thank you @VladLasitsa, feel free to merge it when it is green
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @VladLasitsa |
@elasticmachine run elasticsearch-ci/docs |
…lastic#93608) * Make 'enter time range' value as default and add telemetry for 'last value' mode * Fix telemetry schema * Fix test * Add possibility count timeseries created from dashboard * Fix remark * Fix remark * Fix problem with time_range_mode * Fix tests * Fix tests * Fix tests for markdown and table * exclude TSVB which have type as timeseries * Add description for field in schema in telemetry * Fix telemetry schema * Fix some remarks * Added check for hits * fix CI * fix CI Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
…93608) (#95662) * Make 'enter time range' value as default and add telemetry for 'last value' mode * Fix telemetry schema * Fix test * Add possibility count timeseries created from dashboard * Fix remark * Fix remark * Fix problem with time_range_mode * Fix tests * Fix tests * Fix tests for markdown and table * exclude TSVB which have type as timeseries * Add description for field in schema in telemetry * Fix telemetry schema * Fix some remarks * Added check for hits * fix CI * fix CI Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alexey Antonov <alexwizp@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Closes: #91506
Summary
Sets default value for "Data timerange mode" as
entire time range
. Also adds telemetry for count TSVB visualizations which uselast value
mode.Telemetry has the following structure:
Dev Docs
Uses
entire time range
as default value for "Data timerange mode" in TSVB (top N, markdown, gauge, metric, table).