Fix span IsRecording when not sampling#1750
Merged
MrAlias merged 12 commits intoopen-telemetry:mainfrom Mar 30, 2021
Merged
Conversation
…correct span.isRecording logic to return false when not being sampled
…ment instead of all 3
tests and check for when span is ended immediately
Improve readability of test name Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Improve readability of test name Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Codecov Report
@@ Coverage Diff @@
## main #1750 +/- ##
=======================================
+ Coverage 78.0% 78.1% +0.1%
=======================================
Files 132 132
Lines 6948 6948
=======================================
+ Hits 5422 5432 +10
+ Misses 1276 1270 -6
+ Partials 250 246 -4
|
MrAlias
reviewed
Mar 29, 2021
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
MrAlias
approved these changes
Mar 29, 2021
Aneurysm9
approved these changes
Mar 29, 2021
XSAM
approved these changes
Mar 30, 2021
Contributor
|
@bryan-aguilar updates from maintainer are off for this PR so I'm not able to merge in main. Can you do this so we can merge this PR? |
Contributor
Author
|
@MrAlias Updated, sorry about that. |
Merged
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.
The
span.IsRecording()call would incorrectly return true even if theSampler.ShouldSample() == DROP.An issue also arose in
TestSamplingtest case after the original issue was resolved. The test case checked that all threeexecutionTracerTaskEndfunctions would be executed instead of just one. These function calls are never executed if the span was not recorded.Fixes #1664