-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Metrics][Discover] Discover to prefer line chars for time series data #244595
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
base: main
Are you sure you want to change the base?
[Metrics][Discover] Discover to prefer line chars for time series data #244595
Conversation
src/platform/packages/shared/kbn-unified-histogram/services/lens_vis_service.ts
Outdated
Show resolved
Hide resolved
3444eab to
f37dab2
Compare
735f551 to
ca5109f
Compare
ca5109f to
4c88e52
Compare
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
|
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
|
Pinging @elastic/kibana-esql (Team:ESQL) |
|
@elasticmachine merge upstream |
stratoula
left a comment
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.
Thanx Carlos, it works ok! I have added some ideas on how to make this function a bit smarter. I dont think you need the bucketColumns logic. Check my last comment.
You also don't get into account the TBucket function which I am assuming is going to be the most popular one with timeseries.
Last but not least before we merge it, let's wait for this to get merged first #244753 (to test them together) and I am also seen some weird behavior in ES|QL in some cases, for example
TS kibana_sample_data_logstsdb | EVAL meow = DATE_TRUNC(1 hour, @timestamp) | STATS AVG(LAST_OVER_TIME(bytes)) BY meow
The above is another way to create time buckets and is not working correctly in ES|QL TS mode. I asked the team, so let's wait for them to respond first to see if we should also include it on our checks or not!
src/platform/packages/shared/kbn-esql-utils/src/utils/query_parsing_helpers.ts
Show resolved
Hide resolved
src/platform/packages/shared/kbn-esql-utils/src/utils/query_parsing_helpers.ts
Outdated
Show resolved
Hide resolved
src/platform/packages/shared/kbn-esql-utils/src/utils/query_parsing_helpers.ts
Outdated
Show resolved
Hide resolved
src/platform/packages/shared/kbn-esql-utils/src/utils/query_parsing_helpers.ts
Show resolved
Hide resolved
src/platform/packages/shared/kbn-esql-utils/src/utils/query_parsing_helpers.ts
Outdated
Show resolved
Hide resolved
davismcphee
left a comment
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.
Tested locally, Data Discovery changes LGTM 👍
| const preferredChartType = | ||
| !mappedPreferredChartType && hasTimeseriesBucketAggregation(query.esql, columns) | ||
| ? ChartType.Line | ||
| : mappedPreferredChartType; |
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.
Ideally we'd add a test case for this to lens_vis_service.suggestions.test.ts.
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.
thanks. I'll add a test case there
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.
|
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
History
|
closes #236261
Summary
Changes the call to Suggestion API in Discover to set the preferred char type as
lineif the query contains a timeseries bucket aggregationShould work
Important
The scenario above depends on this PR #244753
Should not work
