Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Fix duplicate spans issue and clean up#545

Merged
mayurkale22 merged 3 commits into
census-instrumentation:masterfrom
mayurkale22:cleanup_fix_duplicate_spans
May 23, 2019
Merged

Fix duplicate spans issue and clean up#545
mayurkale22 merged 3 commits into
census-instrumentation:masterfrom
mayurkale22:cleanup_fix_duplicate_spans

Conversation

@mayurkale22
Copy link
Copy Markdown
Member

Fixes #542

@mayurkale22
Copy link
Copy Markdown
Member Author

@hekike Please review.

@codecov-io
Copy link
Copy Markdown

codecov-io commented May 22, 2019

Codecov Report

Merging #545 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #545      +/-   ##
==========================================
- Coverage   95.34%   95.34%   -0.01%     
==========================================
  Files         147      147              
  Lines       10600    10553      -47     
  Branches      735      734       -1     
==========================================
- Hits        10107    10062      -45     
+ Misses        493      491       -2
Impacted Files Coverage Δ
src/trace/model/no-record/no-record-root-span.ts 51.85% <0%> (-4.15%) ⬇️
src/trace/model/no-record/no-record-span.ts 58.66% <0%> (-1.61%) ⬇️
src/trace/model/span.ts 96.57% <0%> (-1.35%) ⬇️
src/instana.ts 74.57% <0%> (-1.29%) ⬇️
test/test-jaeger-format.ts 93.75% <0%> (-1.17%) ⬇️
test/test-stackdriver-cloudtrace.ts 99.18% <0%> (-0.03%) ⬇️
src/jaeger.ts 82.92% <0%> (ø) ⬆️
src/trace/model/root-span.ts 100% <0%> (ø) ⬆️
src/zipkin.ts 94.2% <0%> (+0.08%) ⬆️
src/stackdriver-cloudtrace.ts 92.72% <0%> (+0.13%) ⬆️
... and 3 more

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 f68aa53...07b564e. Read the comment docs.

onEndSpan(span: modelTypes.Span) {
// Add spans of a trace together when root is ended, skip non root spans.
// publish function will extract child spans from root.
if (span.constructor.name !== 'RootSpan') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we have an isRoot on the span btw?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done, 07b564e. PTAL

Copy link
Copy Markdown
Contributor

@draffensperger draffensperger left a comment

Choose a reason for hiding this comment

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

LGTM once comment about how to determine whether a span is a root span is resolved.

@mayurkale22 mayurkale22 merged commit 2951f96 into census-instrumentation:master May 23, 2019
@mayurkale22 mayurkale22 deleted the cleanup_fix_duplicate_spans branch May 23, 2019 21:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTPS plugin results in duplicate spans

5 participants