-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[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
[APM] Storage explorer improvements #143179
Conversation
… overall storage configured for ES
/oblt-deploy |
…s' into apm-storage-explorer-improvements
@@ -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', |
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.
We can check if renaming it will break telemetry
x-pack/plugins/apm/public/components/app/storage_explorer/resources/tips_and_resources.tsx
Show resolved
Hide resolved
/oblt-deploy |
Pinging @elastic/apm-ui (Team:APM) |
/oblt-deploy |
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.
Added some comments
x-pack/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.ts
Outdated
Show resolved
Hide resolved
indices: { | ||
terms: { | ||
field: INDEX, | ||
size: 500, |
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.
We've had multiple SDHs around this kind of limitation, should we already anticipate it and create a setting for this?
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.
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?
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.
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.
const size = | ||
allIndicesStats && | ||
getEstimatedSizeForDocumentsInIndex({ | ||
allIndicesStats, | ||
indexName, | ||
numberOfDocs, | ||
}); |
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.
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
?
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.
Do you mean the check that allIndicesStats
is defined?
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.
is size
a boolean?
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.
No it's the estimated index size
x-pack/plugins/apm/server/routes/storage_explorer/get_storage_details_per_service.ts
Outdated
Show resolved
Hide resolved
{hasData && ( | ||
<EuiText | ||
css={css` | ||
${xlFontSize} |
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.
Why is this xlFontSize
necessary? can't you use the size
prop instead?
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.
It seems to only accept s
, m
, xs
, relative
.
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.
Maybe create an issue on EUI to add it?
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.
I think this is meant to be used for font sizes https://elastic.github.io/eui/#/theming/typography/values
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.
doclinks look good
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.
} as ApmIndicesConfig, | ||
} as unknown as Setup; | ||
|
||
expect(isCrossClusterSearch(mockedSetup)).toBe(false); |
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.
expect(isCrossClusterSearch(mockedSetup)).toBe(false); | |
expect(isCrossClusterSearch(mockedSetup)).toBeFalsy() |
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.
This will still pass with all falsy values (false
, 0
, ''
, null
, undefined
, and NaN
)
{hasData && ( | ||
<EuiText | ||
css={css` | ||
${xlFontSize} |
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.
Maybe create an issue on EUI to add it?
x-pack/plugins/apm/server/routes/storage_explorer/get_storage_details_per_service.ts
Show resolved
Hide resolved
const size = | ||
allIndicesStats && | ||
getEstimatedSizeForDocumentsInIndex({ | ||
allIndicesStats, | ||
indexName, | ||
numberOfDocs, | ||
}); |
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.
is size
a boolean?
/oblt-deploy |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Summary
Summary stats
Callouts
Performance
Services table and details
Documentation
Add tips and trick section
Closes #142333