Skip to content

[APM] Storage explorer improvements #143179

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

Merged
merged 24 commits into from
Oct 26, 2022

Conversation

gbamparop
Copy link
Contributor

@gbamparop gbamparop commented Oct 12, 2022

Summary

Summary stats

  • Add total APM size
  • Add percentage of disk space used by the APM indices compared to the overall storage configured for ES
  • Improve loading state

image

Callouts

  • Add callout when using cross-cluster search
  • Add callout for enabling progressive loading of data or optimised sorting for the services table

image

image

Performance

  • Add support for optimised sorting to the services table
  • Rows can now be expanded while loading when using the random_sampler aggregation or optimised sorting

Services table and details

  • Improve loading states
  • Display index breakdown table for each service

image

Documentation
Add tips and trick section

image

Closes #142333

@gbamparop
Copy link
Contributor Author

/oblt-deploy

@@ -197,13 +197,13 @@ export const uiSettings: Record<string, UiSettings> = {
[apmServiceInventoryOptimizedSorting]: {
category: [observabilityFeatureId],
name: i18n.translate('xpack.observability.apmServiceInventoryOptimizedSorting', {
defaultMessage: 'Optimize APM Service Inventory page load performance',
defaultMessage: 'Optimize services list load performance in APM',
}),
description: i18n.translate(
'xpack.observability.apmServiceInventoryOptimizedSortingDescription',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can check if renaming it will break telemetry

@gbamparop
Copy link
Contributor Author

/oblt-deploy

@gbamparop gbamparop marked this pull request as ready for review October 18, 2022 21:56
@gbamparop gbamparop requested review from a team as code owners October 18, 2022 21:56
@gbamparop gbamparop added the Team:APM - DEPRECATED Use Team:obs-ux-infra_services. label Oct 18, 2022
@elasticmachine
Copy link
Contributor

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

@gbamparop gbamparop added the release_note:skip Skip the PR/issue when compiling release notes label Oct 18, 2022
@gbamparop
Copy link
Contributor Author

/oblt-deploy

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

Added some comments

indices: {
terms: {
field: INDEX,
size: 500,
Copy link
Contributor

Choose a reason for hiding this comment

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

We've had multiple SDHs around this kind of limitation, should we already anticipate it and create a setting for this?

Copy link
Contributor Author

@gbamparop gbamparop Oct 24, 2022

Choose a reason for hiding this comment

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

I don't think it's worth adding another setting for the number of indices returned for each service as we wouldn't want for the settings to keep growing for each type of terms aggregation. I see the point though that if there are more than 500 indices the sum of their size / docs wouldn't match the one for the service. We could increase the number in case they have a very aggressive ILM policy, display a message if there are more or just change the table to top 500? @sqren WDYT?

Copy link
Member

@sorenlouv sorenlouv Oct 24, 2022

Choose a reason for hiding this comment

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

Imo configuration options are escape hatches when we cannot come up with better solutions. In this case, increasing the size will cause a perf penalty which is also not great for the user.
I'm leaning towards just showing a warning if we hit the limit.

Comment on lines +250 to +256
const size =
allIndicesStats &&
getEstimatedSizeForDocumentsInIndex({
allIndicesStats,
indexName,
numberOfDocs,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks odd, so if allIndicesStats is 0 you don't want to use getEstimatedSizeForDocumentsInIndex? and if allIndicesStats is >= 1 you'll use the value of getEstimatedSizeForDocumentsInIndex?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean the check that allIndicesStats is defined?

Copy link
Contributor

Choose a reason for hiding this comment

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

is size a boolean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it's the estimated index size

{hasData && (
<EuiText
css={css`
${xlFontSize}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this xlFontSize necessary? can't you use the size prop instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems to only accept s, m, xs, relative.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe create an issue on EUI to add it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is meant to be used for font sizes https://elastic.github.io/eui/#/theming/typography/values

Copy link
Contributor

@gchaps gchaps left a comment

Choose a reason for hiding this comment

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

doclinks look good

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM.

} as ApmIndicesConfig,
} as unknown as Setup;

expect(isCrossClusterSearch(mockedSetup)).toBe(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
expect(isCrossClusterSearch(mockedSetup)).toBe(false);
expect(isCrossClusterSearch(mockedSetup)).toBeFalsy()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will still pass with all falsy values (false, 0, '', null, undefined, and NaN)

{hasData && (
<EuiText
css={css`
${xlFontSize}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe create an issue on EUI to add it?

Comment on lines +250 to +256
const size =
allIndicesStats &&
getEstimatedSizeForDocumentsInIndex({
allIndicesStats,
indexName,
numberOfDocs,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

is size a boolean?

@gbamparop
Copy link
Contributor Author

/oblt-deploy

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1331 1334 +3

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 3.1MB 3.1MB +9.3KB
lists 192.2KB 192.5KB +271.0B
total +9.6KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 369.1KB 369.4KB +271.0B

History

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

@gbamparop gbamparop merged commit e390743 into elastic:main Oct 26, 2022
@kibanamachine kibanamachine added v8.6.0 backport:skip This commit does not require backporting labels Oct 26, 2022
@gbamparop gbamparop deleted the apm-storage-explorer-improvements branch May 10, 2023 17: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 release_note:skip Skip the PR/issue when compiling release notes Team:APM - DEPRECATED Use Team:obs-ux-infra_services. v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Implement Storage Explorer improvements
9 participants