Skip to content
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

[APM] Guard searches with range/additional queries #92112

Merged
merged 6 commits into from
Feb 23, 2021

Conversation

dgieselaar
Copy link
Member

@dgieselaar dgieselaar commented Feb 20, 2021

Closes #85385.

The following changes were made:

  • Service version annotations: instead of using a min aggregation on @timestamp, use sort. This is faster (based on limited testing)
  • hasLegacyData: add a range query. This seems consistent with how it's used, as the relevant message is 'Legacy data was detected within the selected time range'. This means that the search will not hit all shards.
  • Add exists queries to the breakdown search, to only include transaction/span breakdown metric documents. We use sum aggregations on fields only available to those documents, so the result is correct even when other metric documents are included. However, ES still needs to aggregate over the documents that we don't care about.

@dgieselaar dgieselaar added Team:APM - DEPRECATED Use Team:obs-ux-infra_services. release_note:skip Skip the PR/issue when compiling release notes v7.13.0 labels Feb 20, 2021
@dgieselaar dgieselaar requested a review from a team as a code owner February 20, 2021 14:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@dgieselaar dgieselaar changed the title [APM] Guard queries with range/additional queries [APM] Guard searches with range/additional queries Feb 20, 2021
@dgieselaar
Copy link
Member Author

@elasticmachine merge upstream

filter: [{ range: { [OBSERVER_VERSION_MAJOR]: { lt: 7 } } }],
filter: [
{ range: { [OBSERVER_VERSION_MAJOR]: { lt: 7 } } },
...rangeQuery(setup.start, setup.end),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we destructure these from setup above? Doesn't matter but it's done consistently everywhere else.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do 👍🏻

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@dgieselaar dgieselaar added the auto-backport Deprecated - use backport:version if exact versions are needed label Feb 23, 2021
@dgieselaar dgieselaar merged commit 89c103a into elastic:master Feb 23, 2021
@dgieselaar dgieselaar deleted the guard-searches branch February 23, 2021 09:31
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Feb 23, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

7.x / #92363

Successful backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Feb 23, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:APM - DEPRECATED Use Team:obs-ux-infra_services. v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Look into searches lacking a range query
4 participants