From 73b58c56f58eeb6644f887be955eb5f337ad28e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Tue, 2 Feb 2021 22:34:54 +0000 Subject: [PATCH] [APM] `transactions.kubernetes.pod` can be undefined (#90044) (#90088) --- .../public/components/shared/TransactionActionMenu/sections.ts | 2 +- x-pack/plugins/apm/typings/es_schemas/raw/fields/kubernetes.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/sections.ts b/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/sections.ts index c77de875dc84f..3cbd2e516a080 100644 --- a/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/sections.ts +++ b/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/sections.ts @@ -54,7 +54,7 @@ export const getSections = ({ urlParams: IUrlParams; }) => { const hostName = transaction.host?.hostname; - const podId = transaction.kubernetes?.pod.uid; + const podId = transaction.kubernetes?.pod?.uid; const containerId = transaction.container?.id; const time = Math.round(transaction.timestamp.us / 1000); diff --git a/x-pack/plugins/apm/typings/es_schemas/raw/fields/kubernetes.ts b/x-pack/plugins/apm/typings/es_schemas/raw/fields/kubernetes.ts index c4169a3e46d94..477e9ef811650 100644 --- a/x-pack/plugins/apm/typings/es_schemas/raw/fields/kubernetes.ts +++ b/x-pack/plugins/apm/typings/es_schemas/raw/fields/kubernetes.ts @@ -5,6 +5,6 @@ */ export interface Kubernetes { - pod: { uid: string; [key: string]: unknown }; + pod?: { uid: string; [key: string]: unknown }; [key: string]: unknown; }