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

[Usage Collection] Use PIT for collecting UI/Usage Counters & AppUsage #135689

Merged
merged 6 commits into from
Jul 6, 2022

Conversation

afharo
Copy link
Member

@afharo afharo commented Jul 5, 2022

Summary

Resolves #96715
Related to #93770

For maintainers

@afharo afharo added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:Telemetry release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting v8.4.0 labels Jul 5, 2022
@afharo afharo requested a review from a team as a code owner July 5, 2022 10:07
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@afharo
Copy link
Member Author

afharo commented Jul 5, 2022

@elasticmachine merge upstream

Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

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

LGTM, just one question

soRepository: ISavedObjectsRepository,
findOptions: SavedObjectsCreatePointInTimeFinderOptions
): Promise<Array<SavedObjectsFindResult<T>>> {
const finder = soRepository.createPointInTimeFinder<T>({ ...findOptions, perPage: 100 });
Copy link
Contributor

Choose a reason for hiding this comment

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

Overall using a PIT search is definitely an improvement.

I still wonder if 100 is the correct batch size? I would have gone with 1k, to avoid having that much additional roundtrips with ES in case of a lot of SOs

Copy link
Member Author

Choose a reason for hiding this comment

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

I used 100 only because that's the value we placed in the docs (so I assumed the recommendation). Happy to change it to any other value.

@lukeelmers as the writer of those docs. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can see in the code we are defaulting to 1000. I'll change it to 1000 then 😇

Copy link
Member

Choose a reason for hiding this comment

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

@lukeelmers as the writer of those docs. What do you think?

Yeah I think I probably just forgot to update the docs when we decided to go with 1000 as the default. There was nothing special about the number 100.

@afharo afharo enabled auto-merge (squash) July 5, 2022 15:47
@afharo afharo disabled auto-merge July 5, 2022 16:19
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@afharo afharo merged commit 4d301fd into elastic:main Jul 6, 2022
@afharo afharo deleted the kbn-96715/use-pit-and-smaller-page-size branch July 6, 2022 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Telemetry release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Usage collection] Use PIT entries for collecting Usage counter / application usage / UI Counters
6 participants