Skip to content

Commit

Permalink
[APM] prefer ECS field names for HTTP and URL (elastic#118485)
Browse files Browse the repository at this point in the history
  • Loading branch information
axw authored and kibanamachine committed Nov 15, 2021
1 parent cca1688 commit 011e056
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/apm/typings/es_schemas/raw/fields/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
export interface Url {
domain?: string;
full: string;
original?: string;
}
4 changes: 4 additions & 0 deletions x-pack/plugins/apm/typings/es_schemas/raw/span_raw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -67,4 +69,6 @@ export interface SpanRaw extends APMBaseDoc {
id: string;
};
child?: { id: string[] };
http?: Http;
url?: Url;
}

0 comments on commit 011e056

Please sign in to comment.