Skip to content

Conversation

@itssharmasandeep
Copy link
Contributor

@itssharmasandeep itssharmasandeep commented Apr 15, 2021

Description

To highlight error span or traces on partial or full error

Testing

Local testing done.

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

Screenshot 2021-04-15 at 5 35 30 PM

@itssharmasandeep itssharmasandeep requested a review from a team as a code owner April 15, 2021 12:07
@codecov
Copy link

codecov bot commented Apr 15, 2021

Codecov Report

Merging #773 (c6898e5) into main (782a58f) will decrease coverage by 0.00%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
...hql/waterfall/trace-waterfall-data-source.model.ts 96.66% <ø> (ø)
...waterfall/api-trace-waterfall-data-source.model.ts 96.55% <ø> (ø)
...ets/waterfall/waterfall/waterfall-chart.service.ts 95.16% <66.66%> (-1.51%) ⬇️
...an-name/span-name-table-cell-renderer.component.ts 100.00% <100.00%> (ø)
...gets/waterfall/waterfall/waterfall-chart.module.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 782a58f...c6898e5. Read the comment docs.

@github-actions

This comment has been minimized.

@aaron-steinfeld
Copy link
Contributor

Pausing this one based on mock discussions around how to make it clearer when a downstream error vs an actual otel-defined error.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

},
{
type: 'table-widget-column',
title: 'Exit Calls',

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

Copy link
Contributor Author

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

Copy link
Member

@JBAhire JBAhire Apr 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's weird because I can see data in Pinot as well as filters on explorer and service screen. Maybe the data you are trying with doesn't have any error spans in API trace?

Screenshot 2021-04-19 at 6 29 43 PM

Screenshot 2021-04-19 at 6 29 28 PM

Screenshot 2021-04-19 at 6 28 57 PM

Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

referennce: #786

@github-actions

This comment has been minimized.

IconModule
],
exports: [WaterfallChartComponent]
exports: [WaterfallChartComponent, SpanNameTableCellRendererComponent]
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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).

Copy link
Contributor Author

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

Copy link
Contributor

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')
  ];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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)) {
Copy link
Contributor

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

{
type: 'table-widget-column',
title: 'Errors',
width: '180px',
Copy link
Contributor

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

Copy link
Contributor Author

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',
Copy link
Contributor

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)

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@itssharmasandeep itssharmasandeep changed the title feat: highlight error span or traces on partial or full error feat: highlight error span on partial or full error Apr 20, 2021
@itssharmasandeep
Copy link
Contributor Author

I have update the PR. So it doesn't contain the changes related to adding error column in the trace lists/tables.
For that change please refer to #786

@kotharironak @aaron-steinfeld

@aaron-steinfeld
Copy link
Contributor

Thanks for splitting em up

@github-actions

This comment has been minimized.

@itssharmasandeep itssharmasandeep removed the request for review from findingrish April 21, 2021 09:46
@itssharmasandeep itssharmasandeep removed the request for review from JBAhire April 21, 2021 09:46
@github-actions

This comment has been minimized.

let color;

if (colorMap.has(node.serviceName)) {
if (node.$$spanName.error) {
Copy link
Contributor

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).

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor Author

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

anandtiwary
anandtiwary previously approved these changes Apr 21, 2021
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Contributor

@arjunlalb arjunlalb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@itssharmasandeep itssharmasandeep merged commit 300ed2e into main Apr 22, 2021
@itssharmasandeep itssharmasandeep deleted the span-error branch April 22, 2021 07:05
@github-actions
Copy link

Unit Test Results

    4 files  ±0  250 suites  ±0   15m 21s ⏱️ + 1m 39s
897 tests ±0  897 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
903 runs  ±0  903 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 300ed2e. ± Comparison against base commit 782a58f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants