-
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
[Maps] [Telemetry] Count indices with geo-fields #51221
[Maps] [Telemetry] Count indices with geo-fields #51221
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
x-pack/legacy/plugins/maps/server/maps_telemetry/maps_telemetry.test.js
Outdated
Show resolved
Hide resolved
...cy/plugins/maps/server/maps_telemetry/test_resources/sample_index_pattern_saved_objects.json
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
} | ||
|
||
async function getIndexPatternSavedObjects(savedObjectsClient) { | ||
const indexPatternSavedObjects = await savedObjectsClient.find({ type: 'index-pattern' }); |
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.
You need to set per_page
and page through results. Otherwise, you are only going to gets stats on first 20 index-patterns. https://github.com/elastic/kibana/blob/master/src/core/server/saved_objects/service/lib/repository.ts#L417
The same is true when fetching map saved objects.
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.
Aha, didn't know that, thanks!
Let's address in separate PR #51345
💚 Build Succeeded |
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.
LGTM
code review
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.
nice addition. lgtm!
- code review
Closes #48790