-
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #773 +/- ##
==========================================
- Coverage 85.42% 85.41% -0.01%
==========================================
Files 792 792
Lines 16161 16163 +2
Branches 2060 2061 +1
==========================================
+ Hits 13805 13806 +1
- Misses 2325 2326 +1
Partials 31 31
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
|
Pausing this one based on mock discussions around how to make it clearer when a downstream error vs an actual otel-defined error. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| }, | ||
| { | ||
| type: 'table-widget-column', | ||
| title: 'Exit Calls', |
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 think the name of an attribute is apiTraceErrorSpanCount in API_TRACE scop
cc: @JBAhire
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.
While using the attribute named errorCount, I am getting the data but not getting any data while using apiTraceErrorSpanCount
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.
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.
errorCount is a different thing - it will be 1 if the api trace is overall in error, 0 otherwise (used for calculating error metrics)
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.
It does work with apiTraceErrorSpanCount now.
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.
referennce: #786
This comment has been minimized.
This comment has been minimized.
| IconModule | ||
| ], | ||
| exports: [WaterfallChartComponent] | ||
| exports: [WaterfallChartComponent, SpanNameTableCellRendererComponent] |
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
| serviceName: datum.serviceName, | ||
| protocolName: datum.protocolName | ||
| protocolName: datum.protocolName, | ||
| error: datum.tags?.error as boolean |
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.
isn't the error state a top level attribute? should we be fetching it directly rather than through the tag map (which means that it would be populated potentially via enrichment, since there's more than one way to mark an error).
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 don't think it is a top level attribute. Whenever I console log the data, I did not see any error attribute but there is one in the tags.
May be I am missing something.
cc: @kotharironak
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.
The top level attributes need to be added to the request, too. See the various waterfall data source models (for example from trace-waterfall-data-source.model.ts:
protected readonly spanSpecifications: Specification[] = [
this.specificationBuilder.attributeSpecificationForKey('displaySpanName'),
this.specificationBuilder.attributeSpecificationForKey('duration'),
this.specificationBuilder.attributeSpecificationForKey('endTime'),
this.specificationBuilder.attributeSpecificationForKey('parentSpanId'),
this.specificationBuilder.attributeSpecificationForKey('serviceName'),
this.specificationBuilder.attributeSpecificationForKey('spanTags'),
this.specificationBuilder.attributeSpecificationForKey('startTime'),
this.specificationBuilder.attributeSpecificationForKey('type'),
this.specificationBuilder.attributeSpecificationForKey('traceId')
];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.
@itssharmasandeep we should be using EVENT. errorCount > 0 to indicate error. This value of this attribute is based on tags that indicate error at span level.
https://github.com/hypertrace/config-bootstrapper/blob/main/config-bootstrapper/src/main/resources/configs/config-bootstrapper/attribute-service/hypertrace/hypertrace_span_attributes.conf#L62
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.
Yeah, I am using the same now.
updated the PR.
| color = originalColors[uniqueServiceIndex % originalColors.length]; | ||
| colorMap.set(node.serviceName, color); | ||
| uniqueServiceIndex++; | ||
| if (colorMap.has(node.serviceName)) { |
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.
extra nest (use else if)
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.
Fixed
projects/observability/src/pages/apis/api-detail/traces/api-trace-list.dashboard.ts
Show resolved
Hide resolved
| { | ||
| type: 'table-widget-column', | ||
| title: 'Errors', | ||
| width: '180px', |
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 is just a number right? 180px feels a bit excessive
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.
Please refer to: #786
| }, | ||
| { | ||
| type: 'table-widget-column', | ||
| title: 'Exit Calls', |
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.
errorCount is a different thing - it will be 1 if the api trace is overall in error, 0 otherwise (used for calculating error metrics)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I have update the PR. So it doesn't contain the changes related to adding error column in the trace lists/tables. |
|
Thanks for splitting em up |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| let color; | ||
|
|
||
| if (colorMap.has(node.serviceName)) { | ||
| if (node.$$spanName.error) { |
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.
nit: the color logic can be isolated to its own method now (since it has gotten bigger).
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, we don't need this as of now.
It is not that big and we also need to handle some local vars(the way code is written currently)
| serviceName: datum.serviceName, | ||
| protocolName: datum.protocolName | ||
| protocolName: datum.protocolName, | ||
| error: datum.errorCount > 0 |
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.
nit: hasError would convey it is boolean and not an error 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.
Yeah,
I have made the changes
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
arjunlalb
left a comment
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.
LGTM



Description
To highlight error span or traces on partial or full error
Testing
Local testing done.
Checklist: