[APM] prefer ECS field names for HTTP and URL (#118485) (#118632)

Co-authored-by: Andrew Wilkins <axw@elastic.co>
This commit is contained in:
Kibana Machine 2021-11-15 19:29:56 -05:00 committed by GitHub
parent 21f3957c3c
commit 40e9b8f33e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View file

@ -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 (
<EuiPortal>

View file

@ -8,4 +8,5 @@
export interface Url {
domain?: string;
full: string;
original?: string;
}

View file

@ -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;
}