-
Notifications
You must be signed in to change notification settings - Fork 11
feat: highlight error span on partial or full error #773
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 6 commits
b1ce950
a407cf3
254a519
0593e3f
4f83aaa
bc46627
db30235
9ba8708
fd9df26
150943f
6b75bdb
c3f9b0a
093f57f
c6898e5
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 |
|---|---|---|
|
|
@@ -3,4 +3,5 @@ export interface SpanNameCellData { | |
| protocolName: string; | ||
| name: string; | ||
| color?: string; | ||
| error?: boolean; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,7 +41,8 @@ export class WaterfallChartService { | |
| $$spanName: { | ||
| name: datum.name, | ||
| serviceName: datum.serviceName, | ||
| protocolName: datum.protocolName | ||
| protocolName: datum.protocolName, | ||
| error: datum.tags?.error as boolean | ||
|
||
| }, | ||
| $$iconType: this.iconLookupService.forSpanType(datum.spanType)!, | ||
| getChildren: () => of([]), | ||
|
|
@@ -82,7 +83,6 @@ export class WaterfallChartService { | |
| // Do DFS | ||
| while (sequenceNodes.length !== 0) { | ||
| const node = sequenceNodes.shift()!; | ||
|
|
||
| if (node.$$state.expanded) { | ||
| segments.push({ | ||
| id: node.id, | ||
|
|
@@ -123,14 +123,18 @@ export class WaterfallChartService { | |
| const node = nodes.shift()!; | ||
| let color; | ||
|
|
||
| if (colorMap.has(node.serviceName)) { | ||
| // ServiceName seen before. Use existing service color | ||
| color = colorMap.get(node.serviceName)!; | ||
| if (node.tags?.error as boolean) { | ||
| color = Color.Red5; // If span conatins an error | ||
| } else { | ||
| // New serviceName. Assign a new color | ||
| color = originalColors[uniqueServiceIndex % originalColors.length]; | ||
| colorMap.set(node.serviceName, color); | ||
| uniqueServiceIndex++; | ||
| if (colorMap.has(node.serviceName)) { | ||
|
||
| // ServiceName seen before. Use existing service color | ||
| color = colorMap.get(node.serviceName)!; | ||
| } else { | ||
| // New serviceName. Assign a new color | ||
| color = originalColors[uniqueServiceIndex % originalColors.length]; | ||
| colorMap.set(node.serviceName, color); | ||
| uniqueServiceIndex++; | ||
| } | ||
| } | ||
|
|
||
| node.color = color; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,6 +58,19 @@ export const apiTraceListDashboard = { | |
| type: 'api-trace-navigation-handler' | ||
| } | ||
| }, | ||
| { | ||
| type: 'table-widget-column', | ||
aaron-steinfeld marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| title: 'Errors', | ||
| width: '180px', | ||
|
||
| filterable: true, | ||
| value: { | ||
| type: 'attribute-specification', | ||
| attribute: 'errorCount' | ||
| }, | ||
| 'click-handler': { | ||
| type: 'api-trace-navigation-handler' | ||
| } | ||
| }, | ||
| { | ||
| type: 'table-widget-column', | ||
| title: 'Duration', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -239,6 +239,19 @@ export class ExplorerDashboardBuilder { | |
| type: 'api-trace-navigation-handler' | ||
| } | ||
| }, | ||
| { | ||
| type: 'table-widget-column', | ||
| title: 'Errors', | ||
| width: '180px', | ||
| filterable: true, | ||
| value: { | ||
| type: 'attribute-specification', | ||
| attribute: 'errorCount' | ||
|
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 think the name of an attribute is
Contributor
Author
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. While using the attribute named
Member
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.
Contributor
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. errorCount is a different thing - it will be 1 if the api trace is overall in error, 0 otherwise (used for calculating error metrics)
Contributor
Author
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 does work with
Contributor
Author
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. referennce: #786 |
||
| }, | ||
| 'click-handler': { | ||
| type: 'api-trace-navigation-handler' | ||
| } | ||
| }, | ||
| { | ||
| type: 'table-widget-column', | ||
| title: 'Duration', | ||
|
|
||



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.
This shouldn't need to be exported since we don't directly reference renderers - did you run into an issue?
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.
I guess, It was a mistake.
Fixed