Fix possible crash during the telemetry processing#1184
Merged
0xnm merged 1 commit intoDec 12, 2022
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1184 +/- ##
===========================================
- Coverage 82.25% 82.23% -0.02%
===========================================
Files 353 353
Lines 11777 11775 -2
Branches 2005 2005
===========================================
- Hits 9686 9682 -4
+ Misses 1474 1473 -1
- Partials 617 620 +3
|
mariusc83
approved these changes
Dec 9, 2022
0xnm
deleted the
nogorodnikov/fix-possible-crash-during-telemetry-processing
branch
December 12, 2022 12:16
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.
What does this PR do?
It is possible to have a crash like this:
It happens because we trigger the task of the consent update check, which is async and at the same time SDK is shutdown. Since we let existing tasks to complete during the executor shutdown, it may be the case when there is no folder anymore, so error is triggered which is processed by telemetry.
And since Kronos was shutdown, we get an exception trying to get server offset.
This change relies on the
DatadogContextinstead, which is created only if feature is still there. Features are removed beforeCoreFeatureis stopped, so I hope this change should fix the issue.Review checklist (to be filled by reviewers)