fix: reading sampling priority will error when not available #483
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.
What does this PR do?
Fixes a bug in which reading sampling priority will cause an error, because it was undefined. Previously, before adding W3C, we'd just set always
AUTO_KEEP
, but now we decided on getting whatever the trace context had.Now, if not available, we'll go back to using
AUTO_KEEP
, while respecting whichever was there before if set.Motivation
#482
Testing Guidelines
Added unit tests.
Additional Notes
Introduced in: f05c600#diff-8367049249917f97a7d4b0d7aa3355ac631ce80bd38d35f0f04c9288c603b76a
Types of Changes
Check all that apply