Fix telemetry shutdown and log max filter#432
Merged
Conversation
Fixing max() in max_level_hint(). And properly dropping the telemetry worker: When the runtime is shutdown with pending apps, it will send Stop, but never actually shutdown the telemetry instances. This regressed with d1fb3bc. Now we simply drop the telemetry handle, which implicitly stops the worker as well causes the worker to be joined properly. Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #432 +/- ##
==========================================
+ Coverage 66.14% 66.17% +0.02%
==========================================
Files 187 187
Lines 23166 23171 +5
==========================================
+ Hits 15324 15334 +10
+ Misses 7842 7837 -5
|
bantonsson
approved these changes
May 16, 2024
| .values() | ||
| .map(|f| f.max_level_hint()) | ||
| .min() | ||
| .max() |
Contributor
There was a problem hiding this comment.
The whole ordering implementations for Level and LevelFilter makes my head spin since the actual underlying enum for both is ordered the other way around, i.e. Debug is 1 and Warn is 3, but apparently Debug is greater than Warn.
Contributor
Author
There was a problem hiding this comment.
Yes, that's exactly why I made the mistake in the first place. Really a what the fuck moment :-D
morrisonlevi
pushed a commit
that referenced
this pull request
May 16, 2024
Fixing max() in max_level_hint(). And properly dropping the telemetry worker: When the runtime is shutdown with pending apps, it will send Stop, but never actually shutdown the telemetry instances. This regressed with d1fb3bc. Now we simply drop the telemetry handle, which implicitly stops the worker as well causes the worker to be joined properly. Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
r1viollet
added a commit
that referenced
this pull request
May 17, 2024
This reverts commit 1ecd94c.
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.
Fixing max() in max_level_hint().
And properly dropping the telemetry worker:
When the runtime is shutdown with pending apps, it will send Stop, but never actually shutdown the telemetry instances. This regressed with d1fb3bc. Now we simply drop the telemetry handle, which implicitly stops the worker as well causes the worker to be joined properly.
At least this led to the occasional deadlocked sidecar.