-
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
[APM] Make UI indices space aware (support for spaces) #126176
[APM] Make UI indices space aware (support for spaces) #126176
Conversation
1662c61
to
71ad988
Compare
Pinging @elastic/apm-ui (Team:apm) |
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 review only --
Thanks for the detailed PR description! In general the approach looks good, a couple nits below.
x-pack/plugins/apm/server/saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware.ts
Outdated
Show resolved
Hide resolved
...lugins/apm/server/saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware.test.ts
Show resolved
Hide resolved
In terms of indication to the user that these index settings are now space-aware, we can utilize the current Advanced Settings callout, since there are no other examples of space-awareness indications in Kibana (afaik). Feel free to move this to another issue/PR as this could be seen as an enhancement. PS: The icon used in the callout is |
8721bca
to
5041281
Compare
|
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!
x-pack/plugins/apm/server/routes/settings/apm_indices/save_apm_indices.ts
Outdated
Show resolved
Hide resolved
💚 Build SucceededMetrics [docs]Async chunks
Saved Objects .kibana field count
History
To update your PR or re-run it, just comment with: |
x-pack/plugins/apm/server/saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware.ts
Show resolved
Hide resolved
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
* new apm indices saved object * adding some comments * fixing typo * addressing PR comments * fixing tests * addressing PR comments * fixing tests * fixing test * showing callout with space name * addressing PR changes
closes #49647
closes #125964
To accomplish it, a new saved object type had to be created
apm-indices-space
(suggestion for a better name is welcome), since changing the current one to be space aware is not possible. So in order to migrate the current APM indices, a new migration process was added onserver/plugin.start()
. It first fetches the legacy APM indices, then fetches all available spaces, and then bulk creates the new APM indices for each available space after that the legacy one is deleted.When default indices are NOT overwritten
Query:
1. Default space:
Indices:
Service inventory:
2. Space A
Service inventory:
When default indices are overwritten
1. Default space:
Indices:
Service inventory:
Query:
2. Space A
Indices:
Service inventory:
Query:
3. Space B
Indices:
Service inventory:
Query: