-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed _Source use from get_trace_items
#191647
Changes from all commits
111df68
78e1b65
a2a0565
fddcff4
18954f6
3bd5c99
6a4a8e8
d438980
96ad20e
0fe5b64
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,83 +6,61 @@ | |
*/ | ||
|
||
import { Exception } from '../../typings/es_schemas/raw/error_raw'; | ||
import { EventOutcome } from '../../typings/es_schemas/raw/fields/event_outcome'; | ||
import { SpanLink } from '../../typings/es_schemas/raw/fields/span_links'; | ||
import { TimestampUs } from '../../typings/es_schemas/raw/fields/timestamp_us'; | ||
import { AgentName } from '../../typings/es_schemas/ui/fields/agent'; | ||
|
||
export interface WaterfallTransaction { | ||
timestamp: TimestampUs; | ||
trace: { id: string }; | ||
service: { | ||
name: string; | ||
environment?: string; | ||
}; | ||
agent: { name: AgentName }; | ||
event?: { outcome?: EventOutcome }; | ||
parent?: { id?: string }; | ||
processor: { event: 'transaction' }; | ||
transaction: { | ||
duration: { us: number }; | ||
id: string; | ||
name: string; | ||
type: string; | ||
result?: string; | ||
}; | ||
faas?: { | ||
coldstart?: boolean; | ||
}; | ||
span?: { | ||
links?: SpanLink[]; | ||
}; | ||
'timestamp.us': number[]; | ||
'trace.id': string[]; | ||
'service.name': string[]; | ||
'service.environment'?: string[]; | ||
'agent.name': string[]; | ||
'event.outcome'?: string[]; | ||
'parent.id'?: string[]; | ||
'processor.event': ['transaction']; | ||
'transaction.duration.us': number[]; | ||
'transaction.id': string[]; | ||
'transaction.name': string[]; | ||
'transaction.type': string[]; | ||
'transaction.result'?: string[]; | ||
'faas.coldstart'?: boolean[]; | ||
'span.links.span.id'?: string[]; | ||
'span.links.trace.id'?: string[]; | ||
Comment on lines
+12
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Q: Why is everything defined as arrays? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the data returned by 'fields' is always wrapped in an array : https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html#search-fields-response There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tend to agree with @crespocarlos here. IMHO the APIs must return the same payload whether we query for _source or fields. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It shall be done. |
||
} | ||
|
||
export interface WaterfallSpan { | ||
timestamp: TimestampUs; | ||
trace: { id: string }; | ||
service: { | ||
name: string; | ||
environment?: string; | ||
}; | ||
agent: { name: AgentName }; | ||
event?: { outcome?: EventOutcome }; | ||
parent?: { id?: string }; | ||
processor: { event: 'span' }; | ||
span: { | ||
id: string; | ||
type: string; | ||
subtype?: string; | ||
action?: string; | ||
name: string; | ||
composite?: { | ||
count: number; | ||
sum: { us: number }; | ||
compression_strategy: string; | ||
}; | ||
sync?: boolean; | ||
duration: { us: number }; | ||
links?: SpanLink[]; | ||
}; | ||
transaction?: { | ||
id: string; | ||
}; | ||
child?: { id: string[] }; | ||
'timestamp.us': number[]; | ||
'trace.id': string[]; | ||
'service.name': string[]; | ||
'service.environment'?: string[]; | ||
'agent.name': AgentName[]; | ||
'event.outcome'?: string[]; | ||
'parent.id'?: string[]; | ||
'processor.event': ['span']; | ||
'span.id': string[]; | ||
'span.type': string[]; | ||
'span.subtype'?: string[]; | ||
'span.action'?: string[]; | ||
'span.name': string[]; | ||
'span.composite.count'?: number[]; | ||
'span.composite.sum.us'?: number[]; | ||
'span.composite.compression_strategy'?: string[]; | ||
'span.sync'?: boolean[]; | ||
'span.duration.us': number[]; | ||
'span.links.span.id'?: string[]; | ||
'span.links.trace.id'?: string[]; | ||
'transaction.id'?: string[]; | ||
'child.id'?: string[]; | ||
} | ||
|
||
export interface WaterfallError { | ||
timestamp: TimestampUs; | ||
trace?: { id: string }; | ||
transaction?: { id: string }; | ||
parent?: { id: string }; | ||
error: { | ||
id: string; | ||
log?: { | ||
message: string; | ||
}; | ||
exception?: Exception[]; | ||
grouping_key: string; | ||
}; | ||
service: { | ||
name: string; | ||
}; | ||
'timestamp.us': number[]; | ||
'trace.id'?: string[]; | ||
'transaction.id'?: string[]; | ||
'parent.id'?: string[]; | ||
'error.id': string[]; | ||
'error.log.message'?: string[]; | ||
'error.exception.message'?: string[]; | ||
'error.exception'?: Exception[]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to get resolved There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, yes, I think the exception stack trace (and possibly span links) need to be fetched from _source. Make sure to only fetch the fields you need from source using source filtering. Note that the structure will be different for OTel values. So we'll probably want to normalize/convert the data to have a consistent model the UI can work with. |
||
'error.grouping_key': string[]; | ||
'service.name': string[]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: is there anything we can do to avoid changing the types here?