[9.0] Android dashboard changes (#213734) (#214603)

# Backport

This will backport the following commits from `main` to `9.0`:
- [Android dashboard changes
(#213734)](https://github.com/elastic/kibana/pull/213734)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"César","email":"56847527+LikeTheSalad@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-14T16:00:34Z","message":"Android
dashboard changes (#213734)\n\n## Summary\n\nResolves #213730 \n\n##
Overview tab\n\n###
Before\n\n![Overview\nbefore](https://github.com/user-attachments/assets/e0a61d8b-2649-4738-8276-bf366c7bfbb4)\n\n###
After\n\n![Overview\nafter](https://github.com/user-attachments/assets/19b00766-1c4f-4233-ae82-167b65192534)\n\n##
Errors tab\n\n###
Before\n\n![Errors\nbefore](https://github.com/user-attachments/assets/e5b3d0c3-b377-4e46-a195-47de05326181)\n\n###
After\n\n![Errors\nafter](https://github.com/user-attachments/assets/1c219849-05f5-4bfc-a198-2957848fe93b)\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"7e8d0c61cc9075da1a1b85a479652eb0d59f3139","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","Team:obs-ux-infra_services","v9.1.0","backport:8.18"],"title":"Android
dashboard
changes","number":213734,"url":"https://github.com/elastic/kibana/pull/213734","mergeCommit":{"message":"Android
dashboard changes (#213734)\n\n## Summary\n\nResolves #213730 \n\n##
Overview tab\n\n###
Before\n\n![Overview\nbefore](https://github.com/user-attachments/assets/e0a61d8b-2649-4738-8276-bf366c7bfbb4)\n\n###
After\n\n![Overview\nafter](https://github.com/user-attachments/assets/19b00766-1c4f-4233-ae82-167b65192534)\n\n##
Errors tab\n\n###
Before\n\n![Errors\nbefore](https://github.com/user-attachments/assets/e5b3d0c3-b377-4e46-a195-47de05326181)\n\n###
After\n\n![Errors\nafter](https://github.com/user-attachments/assets/1c219849-05f5-4bfc-a198-2957848fe93b)\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"7e8d0c61cc9075da1a1b85a479652eb0d59f3139"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213734","number":213734,"mergeCommit":{"message":"Android
dashboard changes (#213734)\n\n## Summary\n\nResolves #213730 \n\n##
Overview tab\n\n###
Before\n\n![Overview\nbefore](https://github.com/user-attachments/assets/e0a61d8b-2649-4738-8276-bf366c7bfbb4)\n\n###
After\n\n![Overview\nafter](https://github.com/user-attachments/assets/19b00766-1c4f-4233-ae82-167b65192534)\n\n##
Errors tab\n\n###
Before\n\n![Errors\nbefore](https://github.com/user-attachments/assets/e5b3d0c3-b377-4e46-a195-47de05326181)\n\n###
After\n\n![Errors\nafter](https://github.com/user-attachments/assets/1c219849-05f5-4bfc-a198-2957848fe93b)\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"7e8d0c61cc9075da1a1b85a479652eb0d59f3139"}}]}]
BACKPORT-->

Co-authored-by: César <56847527+LikeTheSalad@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2025-03-15 04:48:55 +11:00 committed by GitHub
parent 9a627af7b2
commit 9ebac082ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 56 additions and 40 deletions

View file

@ -10,6 +10,8 @@ import { EuiTab, EuiTabs, EuiSpacer } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { MobileErrorsOverview } from '../errors_overview';
import { MobileCrashesOverview } from '../crashes_overview';
import { isAndroidAgentName } from '../../../../../../common/agent_name';
import { useApmServiceContext } from '../../../../../context/apm_service/use_apm_service_context';
export enum MobileErrorTabIds {
ERRORS = 'errors',
@ -41,6 +43,8 @@ export function Tabs({
mobileErrorTabId: MobileErrorTabIds;
onTabClick: (nextTab: MobileErrorTabIds) => void;
}) {
const { agentName } = useApmServiceContext();
const isAndroidAgent = isAndroidAgentName(agentName);
const selectedTabId = mobileErrorTabId;
const tabEntries = tabs.map((tab, index) => (
<EuiTab
@ -58,8 +62,12 @@ export function Tabs({
return (
<>
<EuiTabs>{tabEntries}</EuiTabs>
<EuiSpacer />
{!isAndroidAgent && (
<>
<EuiTabs>{tabEntries}</EuiTabs>
<EuiSpacer />
</>
)}
{selectedTabId === MobileErrorTabIds.ERRORS && <MobileErrorsOverview />}
{selectedTabId === MobileErrorTabIds.CRASHES && <MobileCrashesOverview />}
</>

View file

@ -20,6 +20,7 @@ import { ServiceOverviewThroughputChart } from '../../service_overview/service_o
import { TransactionsTable } from '../../../shared/transactions_table';
import { MostUsedCharts } from './most_used_charts';
import { GeoMap } from './geo_map';
import { isAndroidAgentName } from '../../../../../common/agent_name';
import { FailedTransactionRateChart } from '../../../shared/charts/failed_transaction_rate_chart';
import { ServiceOverviewDependenciesTable } from '../../service_overview/service_overview_dependencies_table';
import { LatencyChart } from '../../../shared/charts/latency_chart';
@ -35,9 +36,10 @@ import { useAdHocApmDataView } from '../../../../hooks/use_adhoc_apm_data_view';
export const chartHeight = 288;
export function MobileServiceOverview() {
const { serviceName } = useApmServiceContext();
const { serviceName, agentName } = useApmServiceContext();
const router = useApmRouter();
const { dataView } = useAdHocApmDataView();
const isAndroidAgent = isAndroidAgentName(agentName);
const {
query,
@ -96,36 +98,40 @@ export function MobileServiceOverview() {
>
<ChartPointerEventContextProvider>
<EuiFlexGroup direction="column" gutterSize="s">
<EuiFlexItem>
<MobileStats start={start} end={end} kuery={kueryWithMobileFilters} />
<EuiSpacer size="s" />
</EuiFlexItem>
<EuiFlexItem>
<EuiPanel hasBorder={true}>
<EuiFlexGroup gutterSize="s">
<EuiFlexItem grow={8}>
<GeoMap
start={start}
end={end}
kuery={kueryWithMobileFilters}
filters={embeddableFilters}
dataView={dataView}
/>
</EuiFlexItem>
<EuiFlexItem grow={3}>
<MobileLocationStats
start={start}
end={end}
kuery={kueryWithMobileFilters}
environment={environment}
offset={offset}
serviceName={serviceName}
comparisonEnabled={comparisonEnabled}
/>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
</EuiFlexItem>
{!isAndroidAgent && (
<>
<EuiFlexItem>
<MobileStats start={start} end={end} kuery={kueryWithMobileFilters} />
<EuiSpacer size="s" />
</EuiFlexItem>
<EuiFlexItem>
<EuiPanel hasBorder={true}>
<EuiFlexGroup gutterSize="s">
<EuiFlexItem grow={8}>
<GeoMap
start={start}
end={end}
kuery={kueryWithMobileFilters}
filters={embeddableFilters}
dataView={dataView}
/>
</EuiFlexItem>
<EuiFlexItem grow={3}>
<MobileLocationStats
start={start}
end={end}
kuery={kueryWithMobileFilters}
environment={environment}
offset={offset}
serviceName={serviceName}
comparisonEnabled={comparisonEnabled}
/>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
</EuiFlexItem>
</>
)}
<EuiFlexItem>
<EuiPanel hasBorder={true}>
@ -182,13 +188,15 @@ export function MobileServiceOverview() {
<EuiFlexItem>
<EuiFlexGroup direction={rowDirection} gutterSize="s" responsive={false}>
<EuiFlexItem grow={3}>
<FailedTransactionRateChart
height={nonLatencyChartHeight}
showAnnotations={false}
kuery={kueryWithMobileFilters}
/>
</EuiFlexItem>
{!isAndroidAgent && (
<EuiFlexItem grow={3}>
<FailedTransactionRateChart
height={nonLatencyChartHeight}
showAnnotations={false}
kuery={kueryWithMobileFilters}
/>
</EuiFlexItem>
)}
<EuiFlexItem grow={7}>
<EuiPanel hasBorder={true}>