Skip to content

Conversation

jake-bassett
Copy link
Contributor

Description

This fixes undefined strings in several places for waterfall.

@jake-bassett jake-bassett requested a review from a team as a code owner April 27, 2021 21:53
@codecov
Copy link

codecov bot commented Apr 27, 2021

Codecov Report

Merging #803 (7e78355) into main (3b90217) will increase coverage by 0.00%.
The diff coverage is 80.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #803   +/-   ##
=======================================
  Coverage   85.41%   85.42%           
=======================================
  Files         792      792           
  Lines       16178    16180    +2     
  Branches     2063     2067    +4     
=======================================
+ Hits        13819    13821    +2     
  Misses       2328     2328           
  Partials       31       31           
Impacted Files Coverage Δ
...omponents/src/sequence/sequence-chart.component.ts 93.18% <ø> (ø)
...ng/src/shared/components/span-detail/span-title.ts 25.00% <0.00%> (ø)
...hql/waterfall/trace-waterfall-data-source.model.ts 96.66% <ø> (ø)
...an-name/span-name-table-cell-renderer.component.ts 100.00% <ø> (ø)
...ets/waterfall/waterfall/waterfall-chart.service.ts 95.16% <ø> (ø)
...waterfall/api-trace-waterfall-data-source.model.ts 96.55% <ø> (ø)
...ing/src/pages/trace-detail/trace-detail.service.ts 97.87% <100.00%> (+0.04%) ⬆️
...waterfall/span-name/span-name-table-cell-parser.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 3b90217...7e78355. Read the comment docs.

@github-actions

This comment has been minimized.

@@ -115,7 +115,6 @@ export class SequenceChartComponent implements OnChanges {
id: segment.id,
start: segment.start - minStart,
end: segment.end - minStart,
label: segment.label,
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 couldn't see anywhere this was used, so removed it. cc: @anandtiwary to confirm this is okay.

Copy link
Contributor

@palbizu palbizu left a comment

Choose a reason for hiding this comment

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

Looks good!. I left a comment to check beforehand to merge it.

}

private buildTitleString(trace: Trace): string {
if (trace.spans?.length === 1) {
const entrySpan = trace.spans[0];

return `${entrySpan.serviceName as string} ${entrySpan.displaySpanName as string}`;
return `${entrySpan.serviceName as string} ${(entrySpan.displaySpanName as string) ?? ''}`.trim();
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be correct to do the trim() before generating the 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.

In this case since we also have a space in the middle of the template, I trim() once the complete string is built to remove any space between (since there might not be a displaySpanName).

@jake-bassett jake-bassett requested a review from a team April 27, 2021 22:56
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

@jake-bassett jake-bassett merged commit 767930f into main Apr 28, 2021
@jake-bassett jake-bassett deleted the fix-waterfall-undefined-strings branch April 28, 2021 18:09
@github-actions
Copy link

Unit Test Results

    4 files  ±0  250 suites  ±0   15m 26s ⏱️ -25s
897 tests ±0  897 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
903 runs  ±0  903 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 767930f. ± Comparison against base commit 3b90217.

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.

3 participants