diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/Waterfall/span_flyout/index.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/Waterfall/span_flyout/index.tsx index 4921dfe0606c37..457daef851bcfb 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/Waterfall/span_flyout/index.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/Waterfall/span_flyout/index.tsx @@ -101,11 +101,11 @@ export function SpanFlyout({ const stackframes = span.span.stacktrace; const codeLanguage = parentTransaction?.service.language?.name; const spanDb = span.span.db; - const httpContext = span.span.http; const spanTypes = getSpanTypes(span); - const spanHttpStatusCode = httpContext?.response?.status_code; - const spanHttpUrl = httpContext?.url?.original; - const spanHttpMethod = httpContext?.method; + const spanHttpStatusCode = + span.http?.response?.status_code || span.span?.http?.response?.status_code; + const spanHttpUrl = span.url?.original || span.span?.http?.url?.original; + const spanHttpMethod = span.http?.request?.method || span.span?.http?.method; return ( diff --git a/x-pack/plugins/apm/typings/es_schemas/raw/fields/url.ts b/x-pack/plugins/apm/typings/es_schemas/raw/fields/url.ts index e9d25904aa0b41..001d6370e5f060 100644 --- a/x-pack/plugins/apm/typings/es_schemas/raw/fields/url.ts +++ b/x-pack/plugins/apm/typings/es_schemas/raw/fields/url.ts @@ -8,4 +8,5 @@ export interface Url { domain?: string; full: string; + original?: string; } diff --git a/x-pack/plugins/apm/typings/es_schemas/raw/span_raw.ts b/x-pack/plugins/apm/typings/es_schemas/raw/span_raw.ts index 01bc0ed52ecaec..d191cb6d4e84ca 100644 --- a/x-pack/plugins/apm/typings/es_schemas/raw/span_raw.ts +++ b/x-pack/plugins/apm/typings/es_schemas/raw/span_raw.ts @@ -7,8 +7,10 @@ import { APMBaseDoc } from './apm_base_doc'; import { EventOutcome } from './fields/event_outcome'; +import { Http } from './fields/http'; import { Stackframe } from './fields/stackframe'; import { TimestampUs } from './fields/timestamp_us'; +import { Url } from './fields/url'; interface Processor { name: 'transaction'; @@ -67,4 +69,6 @@ export interface SpanRaw extends APMBaseDoc { id: string; }; child?: { id: string[] }; + http?: Http; + url?: Url; }