-
Notifications
You must be signed in to change notification settings - Fork 11
feat: fetching log records and showing log icon #817
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
Changes from 1 commit
202b00c
8f0b5c8
533c904
a1d101d
8886ae2
11bee55
77d168d
129b6a4
929f90b
b45756d
01b9bbc
e25a66c
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 |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ import { | |
| TRACE_GQL_REQUEST | ||
| } from '../../../../graphql/request/handlers/traces/trace-graphql-query-handler.service'; | ||
| import { MetadataService } from '../../../../services/metadata/metadata.service'; | ||
| import { WaterfallData } from '../../../widgets/waterfall/waterfall/waterfall-chart'; | ||
| import { LogEvent, WaterfallData } from '../../../widgets/waterfall/waterfall/waterfall-chart'; | ||
| import { GraphQlDataSourceModel } from '../graphql-data-source.model'; | ||
|
|
||
| @Model({ | ||
|
|
@@ -60,6 +60,14 @@ export class TraceWaterfallDataSourceModel extends GraphQlDataSourceModel<Waterf | |
| this.specificationBuilder.attributeSpecificationForKey('errorCount') | ||
| ]; | ||
|
|
||
| protected readonly logEventSpecifications: Specification[] = [ | ||
| this.specificationBuilder.attributeSpecificationForKey('traceId'), | ||
|
||
| this.specificationBuilder.attributeSpecificationForKey('attributes'), | ||
| this.specificationBuilder.attributeSpecificationForKey('timestamp'), | ||
| this.specificationBuilder.attributeSpecificationForKey('spanId'), | ||
| this.specificationBuilder.attributeSpecificationForKey('summary') | ||
| ]; | ||
|
|
||
| public getData(): Observable<WaterfallData[]> { | ||
| return combineLatest([this.getTraceData(), this.getDurationAttribute()]).pipe( | ||
| map(combinedData => this.mapResponseObject(combinedData[0], combinedData[1])) | ||
|
|
@@ -73,7 +81,8 @@ export class TraceWaterfallDataSourceModel extends GraphQlDataSourceModel<Waterf | |
| spanLimit: 1000, | ||
| timestamp: this.dateCoercer.coerce(this.startTime), | ||
| traceProperties: [], | ||
| spanProperties: this.spanSpecifications | ||
| spanProperties: this.spanSpecifications, | ||
| logEventProperties: this.logEventSpecifications | ||
| }); | ||
| } | ||
|
|
||
|
|
@@ -102,7 +111,8 @@ export class TraceWaterfallDataSourceModel extends GraphQlDataSourceModel<Waterf | |
| apiName: span.displaySpanName as string, | ||
| spanType: span.type as SpanType, | ||
| tags: span.spanTags as Dictionary<unknown>, | ||
| errorCount: span.errorCount as number | ||
| errorCount: span.errorCount as number, | ||
| logEvents: ((span.logEvents as Dictionary<LogEvent[]>) ?? {}).results | ||
| })); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,4 +4,5 @@ export interface SpanNameCellData { | |
| apiName?: string; | ||
| color?: string; | ||
| hasError?: boolean; | ||
| hasLogs?: boolean; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ export interface WaterfallData { | |
| responseBody?: string; | ||
| tags: Dictionary<unknown>; | ||
| errorCount: number; | ||
| logEvents?: LogEvent[]; | ||
|
||
| } | ||
|
|
||
| export interface WaterfallDataNode extends WaterfallData, Omit<StatefulPrefetchedTreeTableRow, '$$state'> { | ||
|
|
@@ -37,3 +38,12 @@ export interface WaterfallChartState { | |
| children: WaterfallDataNode[]; | ||
| expanded: boolean; | ||
| } | ||
|
|
||
| export interface LogEvent { | ||
| [key: string]: unknown; | ||
|
||
| traceId?: string; | ||
itssharmasandeep marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| spanId?: string; | ||
| attributes?: Dictionary<unknown>; | ||
| timestamp?: string; | ||
| summary?: 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.
Surprised
startTimeisn't required. Is there a reason some of these properties optional?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.
For
startTimeI've fixed.logEventscan beundefined. Apart from these I do not have much idea. may be same reason for others as well.