-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
otellogr: Fix nil context panic #6527
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6527 +/- ##
=====================================
Coverage 68.5% 68.5%
=====================================
Files 200 200
Lines 16781 16782 +1
=====================================
+ Hits 11500 11501 +1
Misses 4935 4935
Partials 346 346
|
Co-authored-by: Damien Mathieu <[email protected]>
# Conflicts: # CHANGELOG.md
- Remove `ctx` field and related context handling from `LogSink` struct - Simplify `Enabled` method to use `context.Background()` directly - Remove `WithContext` method and associated tests - Clean up test cases related to context handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure a consensus has been reached in #6509.
@@ -176,6 +176,7 @@ func NewLogSink(name string, options ...Option) *LogSink { | |||
logger: c.provider.Logger(name, opts...), | |||
levelSeverity: c.levelSeverity, | |||
opts: opts, | |||
ctx: context.Background(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last thing, but we should be testing the behavior that currently triggers a panic.
I think this is the proper fix and we probably do not need anything more than this. |
Fixes #6509