fix: incorrect order when getting the last active span.#1094
Merged
bruno-garcia merged 5 commits intogetsentry:mainfrom Jun 30, 2021
Merged
fix: incorrect order when getting the last active span.#1094bruno-garcia merged 5 commits intogetsentry:mainfrom
bruno-garcia merged 5 commits intogetsentry:mainfrom
Conversation
Contributor
|
Thank you! Can you please add a changelog entry inside Changelog.md/Unreleased/Fixes section? |
Tyrrrz
reviewed
Jun 30, 2021
Tyrrrz
approved these changes
Jun 30, 2021
Codecov Report
@@ Coverage Diff @@
## main #1094 +/- ##
==========================================
- Coverage 80.70% 79.06% -1.64%
==========================================
Files 194 194
Lines 6359 6359
Branches 1411 1411
==========================================
- Hits 5132 5028 -104
- Misses 764 876 +112
+ Partials 463 455 -8
Continue to review full report at Codecov.
|
Member
|
Thanks @robersonliou ! |
Contributor
Author
|
@bruno-garcia It seems nothing update in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Here is an active span order issue.
when I started multi active span in the same transaction, the span tree in sentry ui was not what I expected.
For example, it should be:
but what I got was:
Here is the actual screenshot:

I've traced the source code, and found this issue was cause by
TransactionTrace.GetLastActiveSpan().The
TransactionTracestored the ongoing span in theConcurrentBag<ISpan>, it worked fine!But the default order of
ConcurrentBagis just like FILO, if I put several active spans sequentially, the result would like as following table:It could be solved by reordering the span.